class ESock::MSessionControl |
Public Member Functions | |
---|---|
void | ActiveOpen () |
void | ActiveOpen (const TDesC8 &) |
void | AutoBind () |
void | CancelIoctl ( TUint , TUint ) |
TInt | GetOption ( TUint , TUint , TDes8 &) |
void | Ioctl ( TUint , TUint , TDes8 *) |
void | LocalName ( TSockAddr &) |
TInt | PassiveOpen ( TUint ) |
TInt | PassiveOpen ( TUint , const TDesC8 &) |
void | RemName ( TSockAddr &) |
TInt | SecurityCheck ( MProvdSecurityChecker *) |
void | SetLocalName ( TSockAddr &) |
TInt | SetOption ( TUint , TUint , const TDesC8 &) |
TInt | SetRemName ( TSockAddr &) |
void | Shutdown ( MSessionControl::TCloseType ) |
void | Shutdown ( MSessionControl::TCloseType , const TDesC8 &) |
void | Start () |
Public Member Enumerations | |
---|---|
enum | TCloseType { ENormal , EStopInput , EStopOutput , EImmediate } |
void | ActiveOpen | ( | const TDesC8 & | aConnectionData | ) | [pure virtual] |
Initiates a connection operation - this means that it tells the protocol to attempt to connect to a peer. It is called by the socket server in response to a connect request from a client.
This version of the function has user data in the connection frame.
Only ever called on connection-oriented sockets. Such a socket should always have both the local address and the remote address specified before this function is called. If this is not the case then the protocol should panic.
When a connection has completed, the protocol should call ConnectComplete() on its TNotify. If an error occurs during connection the protocol should not call ConnectComplete() at all; instead it should call Error().
const TDesC8 & aConnectionData | If the protocol supports user specified connection data, then it will be held in this buffer. |
void | AutoBind | ( | ) | [pure virtual] |
Specifies that the protocol should choose a local address for the service access point itself.
void | CancelIoctl | ( | TUint | aLevel, |
TUint | aName | |||
) | [pure virtual] |
Cancels an outstanding Ioctl call. You are guaranteed only to have one outstanding at once.
TUint aLevel | IOCTL level. |
TUint aName | IOCTL name. |
TInt | GetOption | ( | TUint | level, |
TUint | name, | |||
TDes8 & | anOption | |||
) | const [pure virtual] |
Gets some protocol specific option when called by the socket server on behalf of a client. A protocol may pass the request down a protocol stack (to protocols it is bound to) using the GetOption() function of CProtocolBase .
TUint level | |
TUint name | |
TDes8 & anOption | Option data. |
void | Ioctl | ( | TUint | level, |
TUint | name, | |||
TDes8 * | anOption | |||
) | [pure virtual] |
Performs some protocol specific IO control.
If this function is called erroneously, the protocol should call Error() on the socket. If an Ioctl call is already outstanding, the client will be panicked with the value ETwoIoctls.
TUint level | |
TUint name | |
TDes8 * anOption | Option data. |
void | LocalName | ( | TSockAddr & | anAddr | ) | const [pure virtual] |
Gets the local name (address) of the socket service provider entity. The format of the data in the TSockAddr object is defined by individual protocols.
The local address is the address of the local machine plus a local port number. Generally only the port number is important, unless you have two IP interfaces, for example.
TSockAddr & anAddr | The address to be filled in |
TInt | PassiveOpen | ( | TUint | aQueSize | ) | [pure virtual] |
Tells the protocol to start waiting for an incoming connection request on this socket (i.e. port). It is called by the socket server in response to a listen request from a client.
Only ever called on connection-oriented sockets. Such a socket should always have both the local address and the remote address specified before this function is called. If this is not the case, then the protocol should panic.
The aQue parameter is the number of sockets which can be waiting for an outstanding Start after calling ConnectComplete(). The protocol should keep a count of sockets in this state - incrementing a variable in ConnectComplete(), and decrementing it in Start() .
When a connection has completed, the protocol should call ConnectComplete() on its TNotify. If an error occurs during connection the protocol should not call ConnectComplete() at all; instead it should call Error().
TUint aQueSize | Size of connect queue. |
TInt | PassiveOpen | ( | TUint | aQueSize, |
const TDesC8 & | aConnectionData | |||
) | [pure virtual] |
Tells the protocol to start waiting for an incoming connection request on this socket (i.e. port). It is called by the socket server in response to a listen request from a client.
This version of the function has user data in the connection frame.
Only ever called on connection-oriented sockets. Such a socket should always have both the local address and the remote address specified before this function is called. If this is not the case then the protocol should panic.
The aQue parameter is the number of sockets which can be waiting for an outstanding Start after calling ConnectComplete(). The protocol should keep a count of sockets in this state - incrementing a variable in ConnectComplete(), and decrementing it in Start() .
When a connection has completed the protocol should call ConnectComplete() on its TNotify. If an error occurs during connection the protocol should not call ConnectComplete() at all; instead it should call Error().
TUint aQueSize | size of connect queue |
const TDesC8 & aConnectionData | if the protocol supports user specified connection data then it will be held in this buffer. |
void | RemName | ( | TSockAddr & | anAddr | ) | const [pure virtual] |
Gets the remote name (address) of the socket service provider entity. The format of the data in the TSockAddr object is defined by individual protocols.
A remote address is either the address you're sending data to (non connection-oriented sockets)* or the remote end of the connection. It is the address of the remote machine (your peer in the network) plus a port number.
RemName is only meaningful if the socket server client has called Connect() to set up a default address for SendTo(). This function will only be called on the protocol if this is the case.
TSockAddr & anAddr | The address to be filled in |
TInt | SecurityCheck | ( | MProvdSecurityChecker * | aSecurityChecker | ) | [pure virtual] |
Use the class instance argument to perform security policy checks on the originating client process.
This method is called when a SAP is created and when a socket is transferred between sessions. The SAP is required to check whether the originating client process has enough privileges to request services from the SAP. The MProvdSecurityChecker class instance is used to perform security policy checks. The SAP may choose to perform a security policy check in its SecurityCheck(...) method, or it may choose to store the MProvdSecurityChecker class instance argument and perform checking later (i.e. when subsequent SAP methods are called).
MProvdSecurityChecker * aSecurityChecker | Pointer to class used by SAP to perform security checks on the client process. This pointer becomes invalid when the SAP is destroyed or detached. |
void | SetLocalName | ( | TSockAddr & | anAddr | ) | [pure virtual] |
When the set local name operation has completed, the protocol should call SetLocalNameComplete() on its TNotify
TSockAddr & anAddr |
TInt | SetOption | ( | TUint | level, |
TUint | name, | |||
const TDesC8 & | anOption | |||
) | [pure virtual] |
Sets some protocol specific option when called by the socket server on behalf of a client. A protocol may pass the request down a protocol stack (to protocols it is bound to) using the SetOption() function of CProtocolBase .
TUint level | |
TUint name | |
const TDesC8 & anOption | Option data. |
TInt | SetRemName | ( | TSockAddr & | anAddr | ) | [pure virtual] |
Sets the remote name (address) of the socket service provider entity. The format of the data in the TSockAddr object is defined by individual protocols.
TSockAddr & anAddr | The address |
void | Shutdown | ( | MSessionControl::TCloseType | option | ) | [pure virtual] |
Terminates a connection (or closes a non connection-oriented socket down).
The value of the option argument specifies the type of processing which will be required of the protocol after this function is called.
Normally, when the socket server has called Shutdown() for a socket, it will wait for the socket to call CanClose() before destroying the CSubConnectionFlowBase object. However, if the option argument is EImmediate, the CSubConnectionFlowBase will be destroyed as soon as Shutdown() returns.
MSessionControl::TCloseType option | The shutdown type. |
void | Shutdown | ( | MSessionControl::TCloseType | option, |
const TDesC8 & | aDisconnectionData | |||
) | [pure virtual] |
Terminates a connection (or closes a non connection-oriented socket down).
The value of the option argument specifies the type of processing which will be required of the protocol after this function is called.
Normally, when the socket server has called Shutdown() for a socket, it will wait for the socket to call CanClose() before destroying the CSubConnectionFlowBase object. However, if the option argument is EImmediate, the CSubConnectionFlowBase will be destroyed as soon as Shutdown() returns.
MSessionControl::TCloseType option | The shutdown type. |
const TDesC8 & aDisconnectionData | If the protocol supports disconnect data, any such data required will be held in this buffer. |
Describes the behaviour the SAP should take on shutdown.
ENormal | |
EStopInput | |
EStopOutput | |
EImmediate |
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.