BOSS 7.0.2
BESIII Offline Software System
|
A platform-independent socket API. More...
#include <XmlRpcSocket.h>
Static Public Member Functions | |
static int | socket () |
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) |
Read text from the specified socket. Returns false on error. | |
static bool | nbWrite (int socket, std::string &s, int *bytesSoFar) |
Write text to the specified socket. Returns false on error. | |
static bool | setReuseAddr (int socket) |
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 | 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 17 of file XmlRpcSocket.h.
|
static |
Accept a client connection request.
Definition at line 132 of file XmlRpcSocket.cpp.
Referenced by accept(), and XmlRpc::XmlRpcServer::acceptConnection().
|
static |
Bind to a specified port.
Definition at line 112 of file XmlRpcSocket.cpp.
Referenced by bind(), and XmlRpc::XmlRpcServer::bindAndListen().
|
static |
Closes a socket.
Definition at line 76 of file XmlRpcSocket.cpp.
Referenced by XmlRpc::XmlRpcServer::acceptConnection(), XmlRpc::XmlRpcSource::close(), and close().
|
static |
Connect a socket to a server (from a client)
Definition at line 149 of file XmlRpcSocket.cpp.
Referenced by connect(), and XmlRpc::XmlRpcClient::doConnect().
|
static |
Returns last errno.
Definition at line 235 of file XmlRpcSocket.cpp.
Referenced by getErrorMsg().
|
static |
Returns message corresponding to last error.
Definition at line 247 of file XmlRpcSocket.cpp.
Referenced by XmlRpc::XmlRpcServer::acceptConnection(), XmlRpc::XmlRpcServer::bindAndListen(), XmlRpc::XmlRpcClient::doConnect(), getErrorMsg(), XmlRpc::XmlRpcClient::handleEvent(), XmlRpc::XmlRpcClient::readHeader(), XmlRpc::XmlRpcServerConnection::readHeader(), XmlRpc::XmlRpcServerConnection::readRequest(), XmlRpc::XmlRpcClient::readResponse(), XmlRpc::XmlRpcClient::writeRequest(), and XmlRpc::XmlRpcServerConnection::writeResponse().
|
static |
Returns message corresponding to error.
Definition at line 254 of file XmlRpcSocket.cpp.
|
static |
Set socket in listen mode.
Definition at line 125 of file XmlRpcSocket.cpp.
Referenced by XmlRpc::XmlRpcServer::bindAndListen(), and listen().
Read text from the specified socket. Returns false on error.
Definition at line 172 of file XmlRpcSocket.cpp.
Referenced by XmlRpc::XmlRpcClient::readHeader(), XmlRpc::XmlRpcServerConnection::readHeader(), XmlRpc::XmlRpcServerConnection::readRequest(), and XmlRpc::XmlRpcClient::readResponse().
|
static |
Write text to the specified socket. Returns false on error.
Definition at line 205 of file XmlRpcSocket.cpp.
Referenced by XmlRpc::XmlRpcClient::writeRequest(), and XmlRpc::XmlRpcServerConnection::writeResponse().
|
static |
Sets a stream (TCP) socket to perform non-blocking IO. Returns false on failure.
Definition at line 90 of file XmlRpcSocket.cpp.
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 102 of file XmlRpcSocket.cpp.
Referenced by XmlRpc::XmlRpcServer::bindAndListen().
|
static |
Creates a stream (TCP) socket. Returns -1 on failure.
Definition at line 68 of file XmlRpcSocket.cpp.
Referenced by XmlRpc::XmlRpcServer::bindAndListen(), XmlRpc::XmlRpcClient::doConnect(), and socket().