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

BOOL PSocket::SetOption ( int  option,
int  value,
int  level = SOL_SOCKET 
) [inherited]

Set options on the socket. These options are defined as Berkeley socket options of the class SOL_SOCKET.

Returns:
TRUE if the option was successfully set.
Parameters:
option  Option to set.
value  New value for option.
level  Level for option

Definition at line 1476 of file sockets.cxx.

References PChannel::ConvertOSError(), and PChannel::os_handle.

Referenced by PIPSocket::Connect(), PIPXSocket::Listen(), and PIPSocket::Listen().

{
#ifdef _WIN32_WCE
  if(option == SO_RCVBUF || option == SO_SNDBUF || option == IP_TOS)
    return TRUE;
#endif

  return ConvertOSError(::setsockopt(os_handle, level, option,
                                     (char *)&value, sizeof(value)));
}


Generated by  Doxygen 1.6.0   Back to index