CUpnpTcpServer Class Reference
class CUpnpTcpServer : public CActive
|
A virtual base class for TCP servers. Includes a server socket and methods starting server socket, accepting connections and creating CUpnpTcpSessions for incoming connections. After creating tcp session and adding it to active sessions' tableserver returns to listening for new connections and the tcp session takes care about whole communication with remote host. After handling connection the session is destroyed and removed from sessions' list.
DLNAwebserver.lib
-
Since
-
Series60 2.6
Constructor & Destructor Documentation
CUpnpTcpServer(RSocketServ *, TInt, TInt)
Constructor function. This constructor is used when connection is iniatiated from network.
-
Since
-
Series60 2.6
Parameters
RSocketServ
* aSocketServ
|
Pointer to Socket Server.
|
TInt
aPort
|
Number of listening port.
|
TInt
aIap
|
Number of active Iap to use with connections.
|
~CUpnpTcpServer()
~CUpnpTcpServer
|
(
|
)
|
[virtual]
|
Virtual destructor function.
-
Since
-
Series60 2.6
Member Functions Documentation
AcceptConnectionL()
void
|
AcceptConnectionL
|
(
|
)
|
[protected]
|
Accepts new connection ans starts to listen for new connections.
-
Since
-
Series60 2.6
BaseConstructL()
TcpServer might-leave initialization method. NOTE: Must be called by extending class
-
Since
-
Series60 2.6
BindL(const TInt)
void
|
BindL
|
(
|
const
TInt
|
aPort
|
)
|
|
Starts to listen for incoming connections.
-
Since
-
Series60 5.0
Parameters
const
TInt
aPort
|
try to bind to port
|
BindRandomPortL()
Starts to listen for incoming connections.
-
Since
-
Series60 5.0
CancelRetryTimer()
void
|
CancelRetryTimer
|
(
|
)
|
[protected]
|
Cancels retry timer
-
Since
-
Series60 5.0
CloseSockets()
void
|
CloseSockets
|
(
|
)
|
[protected]
|
Closes sockets
-
Since
-
Series60 5.0
ConnectionAcceptedL(RSocket)
Callback function for new connection creation.
-
Since
-
Series60 2.6
Parameters
RSocket
aSocket
|
Socket that is bound to new connection.
|
CreateConnectionManagerSessionL()
void
|
CreateConnectionManagerSessionL
|
(
|
)
|
[protected]
|
Connects to the Connection Manager
-
Since
-
Series60 5.0
DeleteSession(CUpnpTcpSession *)
Deletes given session.
-
Since
-
Series60 2.6
DoCancel()
void
|
DoCancel
|
(
|
)
|
[virtual]
|
Cancel active object requests Standard active object function
-
Since
-
Series60 2.6
FileReadBufferSize()
TInt
|
FileReadBufferSize
|
(
|
)
|
|
Returns file write buffer size
-
Since
-
Series60 2.6
FileWriteBufferSize()
TInt
|
FileWriteBufferSize
|
(
|
)
|
|
Returns file read buffer size
-
Since
-
Series60 2.6
GetServerAddress(TInetAddr &)
TBool
|
GetServerAddress
|
(
|
TInetAddr
&
|
aAddr
|
)
|
[protected]
|
Gets the value of iServerAddress
-
Since
-
Series60 3.2
HWAddressL()
Returns the Hardware address of active IAP.
-
Since
-
Series60 2.6
NewPortNumberL()
Returns a new available port number.
-
Since
-
Series60 2.6
OpenSocketL()
Opening socket for listening
-
Since
-
Series60 5.0
PrepareToCloseSockets()
void
|
PrepareToCloseSockets
|
(
|
)
|
[protected]
|
Prepares to close sockets
-
Since
-
Series60 5.0
RunError(TInt)
Do active object operations Standard active object function
-
Since
-
Series60 2.6
RunL()
Do active object operations Standard active object function
-
Since
-
Series60 2.6
ServerAddress(TInetAddr &)
void
|
ServerAddress
|
(
|
TInetAddr
&
|
aAddr
|
)
|
|
Returns the IP address of this server.
-
Since
-
Series60 2.6
Parameters
TInetAddr
& aAddr
|
IP address of this server is returned to this reference.
|
ServerPort()
Returns the port of this server.
-
Since
-
Series60 2.6
SetFileReadBufferSize(TInt)
void
|
SetFileReadBufferSize
|
(
|
TInt
|
aSize
|
)
|
|
Sets file read buffer size
-
Since
-
Series60 2.6
SetFileWriteBufferSize(TInt)
void
|
SetFileWriteBufferSize
|
(
|
TInt
|
aSize
|
)
|
|
Sets file write buffer size
-
Since
-
Series60 2.6
SetServerAddress(const TInetAddr &)
void
|
SetServerAddress
|
(
|
const
TInetAddr
&
|
aAddr
|
)
|
|
Set the new IP address
-
Since
-
Series60 5.0 HN
Parameters
const
TInetAddr
& aAddr
|
IP address to be set.
|
StartRetryTimer()
Starts retrying accepting the new connection.
-
Since
-
Series60 3.2
StartToListenL()
TInt
|
StartToListenL
|
(
|
)
|
[protected]
|
Starts to listen a socket.
-
Since
-
Series60 2.6
StopTcpServerL()
Stops TcpServer.
-
Since
-
Series60 2.6
TimerEventL(CUpnpNotifyTimer *)
Callback from iRetrySocketTimer. This method tries to open new socket again, because last time server socket binding has failed.
-
Since
-
Series60 2.6
Member Enumerations Documentation
Enum TState
Enum for state of server.
Member Data Documentation
TInt
iActiveIap
TInt
|
iActiveIap
|
[protected]
|
TCommDbConnPref
iCommDbPref
CUpnpConnectionManagerProxy * iConnectionManagerProxy
TInt
iFileReadBufferSize
TInt
|
iFileReadBufferSize
|
[protected]
|
TInt
iFileWriteBufferSize
TInt
|
iFileWriteBufferSize
|
[protected]
|
CUpnpNotifyTimer * iRetrySocketTimer
TInetAddr
iServerAddress
TInetAddr
|
iServerAddress
|
[protected]
|
TUint
iServerPort
TUint
|
iServerPort
|
[protected]
|
RPointerArray< CUpnpTcpSession > iSessionList
RSocketServ * iSocketServ
MUpnpHttpServerTransactionCreator * iTransactionCreator
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.