#include <comms-infras/es_sap.h>
class ESock::CNetworkFlow : public ESock::CSubConnectionFlowBase |
Protected Member Enumerations | |
---|---|
enum | TStateFlag { ELocalAddressSet, ERemoteAddressSet, ENoBearerRunning, EStarted, ..., EIdleSent } |
Public Member Functions | |
---|---|
virtual | ~CNetworkFlow() |
Service Access Point for SAPs that have a seperate control side.
Provides transport services to a single protocol. Several of the calls to CServProviderBase have pre-conditions attached to them - for example a connection oriented protocol must have its local address set (either by a SetLocalName() or AutoBind()) before it is opened. If the socket server calls the CServProviderBase in such an erroneous way, the protocol should panic.
It also provides an interface towards subconnection providers to allow SAPs to work with a seperate control path.
Since 9.0
IMPORT_C | CNetworkFlow | ( | CSubConnectionFlowFactoryBase & | aFactory, |
const Messages::TNodeId & | aSubConn, | |||
CProtocolIntfBase * | aProtocolIntf | |||
) | [protected] |
void | BindToL | ( | const TCFDataClient::TBindTo & | aBindTo | ) | [protected] |
Request from control side (at network layer) to indicate that the SubConnection is up and running and that we should bind to a Flow below.
MFlowBinderControl * | DoGetBinderControlL | ( | ) | [protected, virtual] |
Reimplemented from ESock::CSubConnectionFlowBase::DoGetBinderControlL()
NetInterfaces::TInterfaceControl * | FetchInterfaceControlL | ( | TSupportedCommsApiExt | aInterfaceId | ) | [protected] |
MSessionControl * | GetControlL | ( | TInt | aSessionType, |
MSessionControlNotify & | aSessionControlNotify | |||
) | [protected, virtual] |
void | SetLocalName | ( | TSockAddr & | anAddr | ) | [protected] |
Sets the local name (address) of the socket service provider entity. The format of the data in the TSockAddr object is defined by individual protocols.
Parameter | Description |
---|---|
anAddr | The address |
Returns: Returns KErrNone if the local name is correctly set or, if this is not the case, an informative error number.
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.
Parameter | Description |
---|---|
anAddr | The address |
Returns: Returns KErrNone if the remote name is correctly set or, if this is not the case, an informative error number.
void | UpdateDestinationAddress | ( | const TSockAddr & | aDest | ) | [protected] |
Sends data onto the network via the protocol.
Connection-oriented sockets must be in a connected state (that is ConnectComplete() has been called on their MSocketNotify before Write() is called).
The socket server keeps track of how much data is waiting and then tries to send it all until the protocol tells it to hold off by returning 0 (datagram sockets) or 'less than all data consumed' (stream sockets) to Write(). The protocol should call CanSend() when it is ready to send more data.
anAddr is the address to write the data to. Connection oriented sockets always use the default value.
Parameter | Description |
---|---|
aDesc | The data to be sent. |
aOptions | Protocol specific options. |
anAddr | Address to write the data to. |
Returns: For stream-oriented protocols the return value is the number of bytes actually written. If this is less than the length of the descriptor then the protocol should call CanSend() when it is ready to send more data. For datagram-oriented protocols, the write should return either 0 if the write cannot be completed, or the length of the descriptor if the write succeeds - no other values are valid. If the Write() must return 0, then it should call CanSend() when it is ready to send more data. If the Write() fails due to some error, then it should call Error() with an informative error number.
TInt | Write | ( | RMBufChain & | aData, |
TUint | aOptions, | |||
TSockAddr * | anAddr | |||
) | [protected] |
Sends data onto the network via the protocol.
Connection-oriented sockets must be in a connected state (that is ConnectComplete() has been called on their MSocketNotify before Write() is called).
The socket server keeps track of how much data is waiting and then tries to send it all until the protocol tells it to hold off by returning 0 (datagram sockets) or 'less than all data consumed' (stream sockets) to Write(). The protocol should call CanSend() when it is ready to send more data.
anAddr is the address to write the data to. Connection oriented sockets always use the default value.
Parameter | Description |
---|---|
aData | The data to be sent. |
aOptions | Protocol specific options. |
anAddr | Address to write the data to. |
Returns: For stream-oriented protocols the return value is the number of bytes actually written. If this is less than the length of the descriptor then the protocol should call CanSend() when it is ready to send more data. For datagram-oriented protocols, the write should return either 0 if the write cannot be completed, or the length of the descriptor if the write succeeds - no other values are valid. If the Write() must return 0, then it should call CanSend() when it is ready to send more data. If the Write() fails due to some error, then it should call Error() with an informative error number.