Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

BOOL PTCPSocket::WriteOutOfBand ( const void *  buf,
PINDEX  len 
) [virtual, inherited]

Write out of band data from the TCP/IP stream. This data is sent as TCP URGENT data which does not follow the usual stream sequencing of the normal channel data.

This is subject to the write timeout and sets the lastWriteCount# member variable in the same way as usual PChannel::Write()# function.

Returns:
TRUE if all the bytes were sucessfully written.
Parameters:
buf  Data to be written as URGENT TCP data.
len  Number of bytes pointed to by buf#.

Definition at line 2786 of file sockets.cxx.

Referenced by SendCommand().

{
#ifdef __NUCLEUS_NET__
  PAssertAlways("WriteOutOfBand unavailable on Nucleus Plus");
  //int count = NU_Send(os_handle, (char *)buf, len, 0);
  int count = ::send(os_handle, (const char *)buf, len, 0);
#elif defined(P_VXWORKS)
  int count = ::send(os_handle, (char *)buf, len, MSG_OOB);
#else
  int count = ::send(os_handle, (const char *)buf, len, MSG_OOB);
#endif
  if (count < 0) {
    lastWriteCount = 0;
    return ConvertOSError(count, LastWriteError);
  }
  else {
    lastWriteCount = count;
    return TRUE;
  }
}


Generated by  Doxygen 1.6.0   Back to index