ESock::MSessionData Class Reference

class ESock::MSessionData

Member Functions Documentation

GetData(TDes8 &, TUint, TSockAddr *)

voidGetData(TDes8 &aDesc,
TUintoptions,
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 & aDescThe buffer for data.
TUint options
TSockAddr * anAddr = NULLAddress where the data came from.

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

TInt GetData(RMBufChain &aData,
TUintaLength,
TUintaOptions,
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 aOptionsProtocol specific options.
TSockAddr * anAddr = NULLAddress where the data came from.

Write(const TDesC8 &, TUint, TSockAddr *)

TUint Write(const TDesC8 &aDesc,
TUintoptions,
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 & aDescThe data to be sent.
TUint options
TSockAddr * anAddr = NULLAddress to write the data to.

Write(RMBufChain &, TUint, TSockAddr *)

TInt Write(RMBufChain &aData,
TUintaOptions,
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 & aDataThe data to be sent.
TUint aOptionsProtocol specific options.
TSockAddr * anAddr = NULLAddress to write the data to.