A platform-independent socket API. More...
#include <XmlRpcSocket.h>
Static Public Member Functions | |
static int | accept (int socket) |
Accept a client connection request. More... | |
static bool | bind (int socket, int port) |
Bind to a specified port. More... | |
static void | close (int socket) |
Closes a socket. More... | |
static bool | connect (int socket, const std::string &host, int port) |
Connect a socket to a server (from a client) More... | |
static int | get_port (int socket) |
static int | getError () |
Returns last errno. More... | |
static std::string | getErrorMsg () |
Returns message corresponding to last error. More... | |
static std::string | getErrorMsg (int error) |
Returns message corresponding to error. More... | |
static bool | listen (int socket, int backlog) |
Set socket in listen mode. More... | |
static bool | nbRead (int socket, std::string &s, bool *eof) |
Read text from the specified socket. Returns false on error. More... | |
static bool | nbWrite (int socket, const std::string &s, int *bytesSoFar) |
Write text to the specified socket. Returns false on error. More... | |
static bool | setNonBlocking (int socket) |
Sets a stream (TCP) socket to perform non-blocking IO. Returns false on failure. More... | |
static bool | setReuseAddr (int socket) |
static int | socket () |
Creates a stream (TCP) socket. Returns -1 on failure. More... | |
Static Public Attributes | |
static bool | s_use_ipv6_ = false |
A platform-independent socket API.
Definition at line 23 of file XmlRpcSocket.h.
|
static |
Accept a client connection request.
Definition at line 183 of file XmlRpcSocket.cpp.
|
static |
Bind to a specified port.
Definition at line 145 of file XmlRpcSocket.cpp.
|
static |
Closes a socket.
Definition at line 109 of file XmlRpcSocket.cpp.
|
static |
Connect a socket to a server (from a client)
Definition at line 202 of file XmlRpcSocket.cpp.
|
static |
Definition at line 397 of file XmlRpcSocket.cpp.
|
static |
Returns last errno.
Definition at line 371 of file XmlRpcSocket.cpp.
|
static |
Returns message corresponding to last error.
Definition at line 383 of file XmlRpcSocket.cpp.
|
static |
Returns message corresponding to error.
Definition at line 390 of file XmlRpcSocket.cpp.
|
static |
Set socket in listen mode.
Definition at line 176 of file XmlRpcSocket.cpp.
|
static |
Read text from the specified socket. Returns false on error.
Definition at line 295 of file XmlRpcSocket.cpp.
|
static |
Write text to the specified socket. Returns false on error.
Definition at line 335 of file XmlRpcSocket.cpp.
|
static |
Sets a stream (TCP) socket to perform non-blocking IO. Returns false on failure.
Definition at line 123 of file XmlRpcSocket.cpp.
|
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 135 of file XmlRpcSocket.cpp.
|
static |
Creates a stream (TCP) socket. Returns -1 on failure.
Definition at line 101 of file XmlRpcSocket.cpp.
|
static |
Definition at line 26 of file XmlRpcSocket.h.