ESock::MSessionData Class Reference

class ESock::MSessionData
Public Member Functions
void GetData ( TDes8 &, TUint , TSockAddr *)
TInt GetData ( RMBufChain &, TUint , TUint , TSockAddr *)
TUint Write (const TDesC8 &, TUint , TSockAddr *)
TInt Write ( RMBufChain &, TUint , TSockAddr *)

Member Functions Documentation

GetData(TDes8 &, TUint, TSockAddr *)

void GetData ( TDes8 & aDesc,
TUint options,
TSockAddr * anAddr = NULL
) [pure virtual]

Gets data which the protocol has indicated is waiting in its buffers using the NewData up-call on the MSocketNotify .

GetData() will only ever be called for as much data as the protocol has specified it can process using the NewData up-call.

For stream oriented protocols GetData() should fill the descriptor with data from the stream. On a datagram protocol GetData() should copy one datagram into the descriptor and set the length of the descriptor. If a full datagram will not fit into the supplied descriptor, the overflow should be discarded.

anAddr should be filled in by the protocol with the address of where the data came from.

Parameters

TDes8 & aDesc The buffer for data.
TUint options
TSockAddr * anAddr = NULL Address where the data came from.

GetData(RMBufChain &, TUint, TUint, TSockAddr *)

TInt GetData ( RMBufChain & aData,
TUint aLength,
TUint aOptions,
TSockAddr * anAddr = NULL
) [pure virtual]

Gets data which the protocol has indicated is waiting in its buffers using the NewData up-call on the MSocketNotify .

GetData() will only ever be called for as much data as the protocol has specified it can process using the NewData up-call.

For stream oriented protocols GetData() should fill the descriptor with data from the stream. On a datagram protocol GetData() should copy one datagram into the descriptor and set the length of the descriptor. If a full datagram will not fit into the supplied descriptor, the overflow should be discarded.

anAddr should be filled in by the protocol with the address of where the data came from.

Parameters

RMBufChain & aData
TUint aLength
TUint aOptions Protocol specific options.
TSockAddr * anAddr = NULL Address where the data came from.

Write(const TDesC8 &, TUint, TSockAddr *)

TUint Write ( const TDesC8 & aDesc,
TUint options,
TSockAddr * anAddr = NULL
) [pure virtual]

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.

Parameters

const TDesC8 & aDesc The data to be sent.
TUint options
TSockAddr * anAddr = NULL Address to write the data to.

Write(RMBufChain &, TUint, TSockAddr *)

TInt Write ( RMBufChain & aData,
TUint aOptions,
TSockAddr * anAddr = NULL
) [pure virtual]

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.

Parameters

RMBufChain & aData The data to be sent.
TUint aOptions Protocol specific options.
TSockAddr * anAddr = NULL Address to write the data to.