#include <socketft.h>
Inheritance diagram for Socket:

Definition at line 43 of file socketft.h.
Public Member Functions | |
| Socket (socket_t s=INVALID_SOCKET, bool own=false) | |
| Socket (const Socket &s) | |
| bool | GetOwnership () const |
| void | SetOwnership (bool own) |
| operator socket_t () | |
| socket_t | GetSocket () const |
| void | AttachSocket (socket_t s, bool own=false) |
| socket_t | DetachSocket () |
| void | CloseSocket () |
| void | Create (int nType=SOCK_STREAM) |
| void | Bind (unsigned int port, const char *addr=NULL) |
| void | Bind (const sockaddr *psa, socklen_t saLen) |
| void | Listen (int backlog=5) |
| bool | Connect (const char *addr, unsigned int port) |
| bool | Connect (const sockaddr *psa, socklen_t saLen) |
| bool | Accept (Socket &s, sockaddr *psa=NULL, socklen_t *psaLen=NULL) |
| void | GetSockName (sockaddr *psa, socklen_t *psaLen) |
| unsigned int | Send (const byte *buf, unsigned int bufLen, int flags=0) |
| unsigned int | Receive (byte *buf, unsigned int bufLen, int flags=0) |
| void | ShutDown (int how=SD_SEND) |
| void | IOCtl (long cmd, unsigned long *argp) |
| bool | SendReady (const timeval *timeout) |
| bool | ReceiveReady (const timeval *timeout) |
| virtual void | HandleError (const char *operation) const |
| void | CheckAndHandleError_int (const char *operation, int result) const |
| void | CheckAndHandleError (const char *operation, socket_t result) const |
| void | CheckAndHandleError (const char *operation, BOOL result) const |
Static Public Member Functions | |
| unsigned int | PortNameToNumber (const char *name, const char *protocol="tcp") |
| look up the port number given its name, returns 0 if not found | |
| void | StartSockets () |
| start Windows Sockets 2 | |
| void | ShutdownSockets () |
| calls WSACleanup for Windows Sockets | |
| int | GetLastError () |
| returns errno or WSAGetLastError | |
| void | SetLastError (int errorCode) |
| sets errno or calls WSASetLastError | |
Protected Member Functions | |
| virtual void | SocketChanged () |
Protected Attributes | |
| socket_t | m_s |
| bool | m_own |
1.3.2