|
BOSS 8.0.0
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 101 of file XmlRpcSocket.cpp.
Referenced by accept(), and XmlRpc::XmlRpcServer::acceptConnection().
|
static |
Bind to a specified port.
Definition at line 89 of file XmlRpcSocket.cpp.
Referenced by bind(), and XmlRpc::XmlRpcServer::bindAndListen().
|
static |
Closes a socket.
Definition at line 63 of file XmlRpcSocket.cpp.
Referenced by XmlRpc::XmlRpcServer::acceptConnection(), close(), and XmlRpc::XmlRpcSource::close().
|
static |
Connect a socket to a server (from a client).
Definition at line 114 of file XmlRpcSocket.cpp.
Referenced by connect(), and XmlRpc::XmlRpcClient::doConnect().
|
static |
Returns last errno.
Definition at line 195 of file XmlRpcSocket.cpp.
Referenced by getErrorMsg().
|
static |
Returns message corresponding to last error.
Definition at line 204 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 207 of file XmlRpcSocket.cpp.
|
static |
Set socket in listen mode.
Definition at line 99 of file XmlRpcSocket.cpp.
Referenced by XmlRpc::XmlRpcServer::bindAndListen(), and listen().
|
static |
Read text from the specified socket. Returns false on error.
Definition at line 133 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 165 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 72 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 81 of file XmlRpcSocket.cpp.
Referenced by XmlRpc::XmlRpcServer::bindAndListen().
|
static |
Creates a stream (TCP) socket. Returns -1 on failure.
Definition at line 58 of file XmlRpcSocket.cpp.
Referenced by XmlRpc::XmlRpcServer::bindAndListen(), XmlRpc::XmlRpcClient::doConnect(), and socket().