virtual void SetBackLog(const unsigned long b)
Set the size of the queue of waiting connections, via listen().
GPL_Boolean SetOptions(const int level, const int option, const void *buffer, const int length)
Set the socket options determined by level and option to have
the value specified by length bytes of buffer. Return
TRUE if the operation succeeds and FALSE if it fails.
int Ioctl(long cmd, char *arg)
Perform I/O control functions on the socket. The type and value of
arg varies with the value of cmd. Return -1 if the
operation fails. Otherwise, the returned value is appropriate to the
value of cmd.
virtual void Reset(void)
Reset the socket to an initialized state.
virtual GPL_Boolean Accept(DNA_IPPoint *destination, DNA_IPSocket & s, DNA_Error & error)
Accept a new connection on the socket via accept(). Upon return,
destination contains the address of the machine which connected,
socket contains the socket on which it connected, and error
contains any errors. Return TRUE if the acceptance succeeds and
FALSE if it fails.
virtual GPL_Boolean Connect(DNA_IPPoint *destination, DNA_Error & error)
Connect, via connect(), to the destination indicated by
destination. Upon return, error contains any errors. Return
TRUE if the connection succeeds and FALSE if it fails.
virtual GPL_Boolean Disconnect(DNA_Error & error)
Disconnect by doing nothing. Upon return, error contains any
errors. Return TRUE if the disconnection succeeds and
FALSE if it fails.
virtual GPL_Boolean Open(DNA_Error & error)
Create a new socket via socket(). Upon return, error
contains any errors. Return TRUE if the opening succeeds and
FALSE if it fails.
virtual GPL_Boolean Bind(DNA_Point *point, DNA_Error & error)
Bind, via bind(), the socket to the source address indicated by
point. Upon return, error contains any errors. Return
TRUE if the binding succeeds and FALSE if it fails.
virtual GPL_Boolean Close(DNA_Error & error)
Close the socket via close(). Upon return, error contains
any errors. Return TRUE if the closing succeeds and FALSE
if it fails.
virtual GPL_Boolean ReadFrom(DNA_IPPoint *destination, void *buffer, const unsigned long size, unsigned long & length, DNA_Error & error)
Read size bytes from the socket into buffer. Upon return,
destination contains the address of the sender, length contains
the number of bytes read, and error contains any errors. Return
TRUE if the read succeeds and FALSE if it fails.
virtual GPL_Boolean ReadFrom(DNA_IPPoint *destination, void *buffer, const unsigned long size, const long timeout, unsigned long & length, DNA_Error & error)
Read size bytes from the socket into buffer. Upon return,
destination contains the address of the sender, length contains
the number of bytes read, and error contains any errors. Return
TRUE if the read succeeds and FALSE if it fails. If
timeout milli-seconds elapse before any data is available for
reading from the socket, sets length to zero and returns
FALSE.
virtual GPL_Boolean Read(void *buffer, const unsigned long size, unsigned long & length, DNA_Error & error)
Read size bytes from the socket into buffer. Upon return,
length contains the number of bytes read, and error contains
any errors. Return TRUE if the read succeeds and FALSE if
it fails.
virtual GPL_Boolean Read(void *buffer, const unsigned long size, const long timeout, unsigned long & length, DNA_Error & error)
Read size bytes from the socket into buffer. Upon return,
length contains the number of bytes read, and error contains
any errors. Return TRUE if the read succeeds and FALSE if
it fails. If timeout milli-seconds elapse before any data is
available for reading from the socket, sets length to zero and
returns FALSE.
virtual GPL_Boolean WriteTo(DNA_IPPoint *destination, void *buffer, const unsigned long size, unsigned long & length, DNA_Error & error)
Write size bytes from buffer to the socket with a destination
indicated by destination. Upon return, length contains the
number of bytes written, and error contains any errors. Return
TRUE if the write succeeds and FALSE if it fails.
virtual GPL_Boolean Write(void *buffer, const unsigned long size, unsigned long & length, DNA_Error & error)
Write size bytes from buffer to the socket. Upon return,
length contains the number of bytes written, and error contains
any errors. Return TRUE if the write succeeds and FALSE if
it fails.
static GPL_Boolean Close(SOCKET_HANDLE & handle)
Close a socket. Return TRUE if the closing succeeds and
FALSE if it fails.
static void GlobalInitialize(void)
Perform any action necessary to initialize the use of sockets.
static void GlobalFinalize(void)
Perform any actions necessary to finalize the use of sockets.