Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



How to send and receive data


Sending data

Use RSocket::Send() and RSocket::SendTo() to send data to a remote host with a flags parameter setting sending options.


Note

[Top]


Receiving data

Use RSocket::Recv(), RSocket::Read(), RSocket::RecvOneOrMore(), and RSocket::RecvFrom() to read data received from a remote host.


TCP

RSocket::Recv() and RSocket::Read() attempt to read the amount of data set by the size of the passed descriptor. These functions only complete when the descriptor is filled, or when the connection closes. If the descriptor is filled, the amount of data read is passed back in aLen. If the connection closes, the descriptor does not contain any data, and aLen should be ignored.

RSocket::RecvOneOrMore() completes as soon as any data is available.


UDP

RSocket::RecvFrom() reads the first queued datagram. On returning, anAddr points to a TInetAddr object holding the address of the remote source of the data.


Note