| OverSim
    | 
A platform-independent socket API. More...
#include <XmlRpcSocket.h>
| Static Public Member Functions | |
| static int | getSocket () | 
| Creates a stream (TCP) socket. Returns -1 on failure. | |
| static void | close (int socket) | 
| Closes a socket. | |
| static bool | setNonBlocking (int socket) | 
| Sets a stream (TCP) socket to perform non-blocking IO. Returns false on failure. | |
| static bool | nbRead (int socket, std::string &s, bool *eof, SSL *ssl) | 
| Read text from the specified socket. Returns false on error. | |
| static bool | nbWrite (int socket, std::string &s, int *bytesSoFar, SSL *ssl) | 
| Write text to the specified socket. Returns false on error. | |
| static bool | setReuseAddr (int socket) | 
| Allow the port the specified socket is bound to to be re-bound immediately so server re-starts are not delayed. | |
| static bool | bind (int socket, int port) | 
| Bind to a specified port. | |
| static bool | listen (int socket, int backlog) | 
| Set socket in listen mode. | |
| static int | accept (int socket) | 
| Accept a client connection request. | |
| static bool | connect (int socket, std::string &host, int port) | 
| Connect a socket to a server (from a client) | |
| static int | getPort (int socket) | 
| Get the port of a bound socket. | |
| static bool | nonFatalError () | 
| Returns true if the last error was not a fatal one (eg, EWOULDBLOCK) | |
| static int | getError () | 
| Returns last errno. | |
| static std::string | getErrorMsg () | 
| Returns message corresponding to last error. | |
| static std::string | getErrorMsg (int error) | 
| Returns message corresponding to error. | |
A platform-independent socket API.
Definition at line 31 of file XmlRpcSocket.h.
| 
 | static | 
Accept a client connection request.
Definition at line 142 of file XmlRpcSocket.cc.
Referenced by XmlRpc::XmlRpcServer::acceptConnection().
| 
 | static | 
Bind to a specified port.
Definition at line 122 of file XmlRpcSocket.cc.
Referenced by XmlRpc::XmlRpcServer::bindAndListen().
| 
 | static | 
Closes a socket.
Definition at line 86 of file XmlRpcSocket.cc.
| 
 | static | 
Connect a socket to a server (from a client)
Definition at line 154 of file XmlRpcSocket.cc.
Referenced by XmlRpc::XmlRpcClient::doConnect().
| 
 | static | 
Returns last errno.
Definition at line 272 of file XmlRpcSocket.cc.
Referenced by getErrorMsg(), and nonFatalError().
| 
 | static | 
Returns message corresponding to last error.
Definition at line 284 of file XmlRpcSocket.cc.
Referenced by XmlRpc::XmlRpcServer::acceptConnection(), XmlRpc::XmlRpcServer::bindAndListen(), XmlRpc::XmlRpcClient::doConnect(), XmlRpc::XmlRpcClient::handleEvent(), XmlRpc::XmlRpcServerConnection::readHeader(), XmlRpc::XmlRpcClient::readHeader(), XmlRpc::XmlRpcServerConnection::readRequest(), XmlRpc::XmlRpcClient::readResponse(), XmlRpc::XmlRpcClient::writeRequest(), and XmlRpc::XmlRpcServerConnection::writeResponse().
| 
 | static | 
Returns message corresponding to error.
Definition at line 291 of file XmlRpcSocket.cc.
| 
 | static | 
Get the port of a bound socket.
Definition at line 253 of file XmlRpcSocket.cc.
| 
 | static | 
Creates a stream (TCP) socket. Returns -1 on failure.
Definition at line 78 of file XmlRpcSocket.cc.
Referenced by XmlRpc::XmlRpcServer::bindAndListen(), and XmlRpc::XmlRpcClient::doConnect().
| 
 | static | 
Set socket in listen mode.
Definition at line 135 of file XmlRpcSocket.cc.
Referenced by XmlRpc::XmlRpcServer::bindAndListen().
| 
 | static | 
Read text from the specified socket. Returns false on error.
Definition at line 177 of file XmlRpcSocket.cc.
Referenced by XmlRpc::XmlRpcServerConnection::readHeader(), XmlRpc::XmlRpcClient::readHeader(), XmlRpc::XmlRpcServerConnection::readRequest(), and XmlRpc::XmlRpcClient::readResponse().
| 
 | static | 
Write text to the specified socket. Returns false on error.
Definition at line 217 of file XmlRpcSocket.cc.
Referenced by XmlRpc::XmlRpcClient::writeRequest(), and XmlRpc::XmlRpcServerConnection::writeResponse().
| 
 | static | 
Returns true if the last error was not a fatal one (eg, EWOULDBLOCK)
Definition at line 70 of file XmlRpcSocket.cc.
Referenced by connect(), nbRead(), and nbWrite().
| 
 | static | 
Sets a stream (TCP) socket to perform non-blocking IO. Returns false on failure.
Definition at line 100 of file XmlRpcSocket.cc.
Referenced by XmlRpc::XmlRpcServer::acceptConnection(), XmlRpc::XmlRpcServer::bindAndListen(), and XmlRpc::XmlRpcClient::doConnect().
| 
 | static | 
Allow the port the specified socket is bound to to be re-bound immediately so server re-starts are not delayed.
Returns false on failure.
Definition at line 112 of file XmlRpcSocket.cc.
Referenced by XmlRpc::XmlRpcServer::bindAndListen().