This topic describes how to send and receive data to a remote host.
When the client connects to the remote host it can send and receive data packets to a remote host. This tutorial describes the following:
The RSocket::Recv() and RSocket::Read() functions attempts to read the amount of data set by the size of the descriptor passed. 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.
The RSocket::RecvOneOrMore() function is completed when data is available.
The RSocket::RecvFrom() function reads the first queued datagram. When it returns anAddr points to a TInetAddr object that holds the address of the remote source of the data. In UDP, if the socket is not bound to a local address and port, then binding is attempted.
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.