Logo Search packages:      
Sourcecode: chromium-browser version File versions  Download package

int nacl::Send ( Handle  socket,
const void *  buffer,
size_t  length,
int  flags 

Sends the message to the remote peer of the connection created by SocketPair(). The total number of bytes sent must be less than 2**32. Note it is not safe to send messages from the same socket handle by multiple threads simultaneously.

socket The socket descriptor.
buffer Pointer to the data to send.
length The length of the data to send.
flags Either 0 or kDontWait.
The number of bytes sent, or -1 upon failure
See also:

Definition at line 45 of file nacl_imc_common.cc.

References SendDatagram().

  MessageHeader header;
  IOVec vec;
  int retval;

  retval = InitHeader(&vec, &header, buffer, length);
  if (retval) {
    return retval;

  return SendDatagram(socket, &header, flags);

Generated by  Doxygen 1.6.0   Back to index