Inheritance diagram for Socket:

Public Member Functions | |
| Socket | accept (MYSERVER_SOCKADDR *, int *) |
| int | bind (MYSERVER_SOCKADDR *, int) |
| virtual u_long | bytesToRead () |
| virtual int | closesocket () |
| int | connect (const char *host, u_short port) |
| virtual int | connect (MYSERVER_SOCKADDR *, int) |
| virtual int | dataOnRead (int sec=0, int usec=500) |
| SocketHandle | getHandle () |
| Socket * | getServerSocket () |
| int | getsockname (MYSERVER_SOCKADDR *, int *) |
| u_long | getThrottling () |
| int | ioctlsocket (long, unsigned long *) |
| int | listen (int) |
| int | operator= (Socket) |
| int | operator== (Socket) |
| virtual int | read (char *buffer, u_long len, u_long *nbr) |
| virtual int | recv (char *, int, int) |
| virtual int | recv (char *, int, int, u_long) |
| int | send (const char *, int, int) |
| int | setHandle (SocketHandle) |
| int | setNonBlocking (int) |
| void | setServerSocket (Socket *) |
| int | setsockopt (int, int, const char *, int) |
| void | setThrottling (u_long) |
| virtual int | shutdown (int how) |
| Socket (SocketHandle) | |
| Socket (Socket *) | |
| Socket () | |
| int | socket (int, int, int) |
| virtual int | write (const char *buffer, u_long len, u_long *nbw) |
Static Public Member Functions | |
| MYSERVER_HOSTENT * | gethostbyaddr (char *addr, int len, int type) |
| MYSERVER_HOSTENT * | gethostbyname (const char *) |
| int | gethostname (char *, int) |
| int | getLocalIPsList (string &) |
| void | stopBlockingOperations (bool) |
Protected Member Functions | |
| virtual int | rawSend (const char *buffer, int len, int flags) |
Protected Attributes | |
| Socket * | serverSocket |
| SocketHandle | socketHandle |
| u_long | throttlingRate |
Static Protected Attributes | |
| bool | denyBlockingOperations = false |
|
|
Constructor of the class. |
|
|
Set the socket handle. |
|
|
Set the socket handle. |
|
||||||||||||
|
Accept a new connection. |
|
||||||||||||
|
Bind the port to the socket. |
|
|
Returns the number of bytes waiting to be read. Reimplemented in SslSocket. |
|
|
Close the socket. Reimplemented in SslSocket. |
|
||||||||||||
|
Connect to the specified host:port. Returns zero on success. |
|
||||||||||||
|
Connect the socket. Reimplemented in SslSocket. |
|
||||||||||||
|
Check if there is data ready to be read. Returns 1 if there is data to read, 0 if not. Reimplemented in SslSocket. |
|
|
Returns the socket handle |
|
||||||||||||||||
|
Returns an host by its address. |
|
|
Returns an host by its name |
|
||||||||||||
|
Returns the hostname. |
|
|
Fill the out string with a list of the local IPs. Returns 0 on success. |
|
|
Returns the server socket. |
|
||||||||||||
|
Returns the sockname. |
|
|
Return the throttling rate(bytes/second) used by the socket. A return value of zero means that no throttling is used. |
|
||||||||||||
|
Function used to control the socket. |
|
|
Listen for other connections. |
|
|
Set the socket using the = operator |
|
|
Check if the two sockets have the same handle descriptor |
|
||||||||||||||||
|
Send data over the socket. Return -1 on error. This routine is accessible only from the Socket class. Reimplemented in SslSocket. |
|
||||||||||||||||
|
Inherithed from Stream. Reimplemented from Stream. |
|
||||||||||||||||
|
Receive data from the socket. Returns -1 on errors. Reimplemented in SslSocket. |
|
||||||||||||||||||||
|
Receive data from the socket. |
|
||||||||||||||||
|
Send data over the socket. Returns -1 on error. Returns the number of bytes sent on success. If a throttling rate is specified, send will use it. |
|
|
Set the handle for the socket |
|
|
Pass a nonzero value to set the socket to be nonblocking. |
|
|
Set the socket used by the server. |
|
||||||||||||||||||||
|
Set socket options. |
|
|
Set the throttling rate(bytes/second) for the socket. Use a zero rate to disable throttling. |
|
|
Shutdown the socket. Reimplemented in SslSocket. |
|
||||||||||||||||
|
Create the socket. |
|
|
Set this to true to stop any operation that can block sockets. |
|
||||||||||||||||
|
Inherited from Stream. Return values are equals to send. Reimplemented from Stream. |
|
|
Stop the sockets system. |
|
|
Pointer to the socket that has accepted this connection. |
|
|
|
|
|
Send throttling rate. |
1.3.9.1