Static Public Member Functions | Static Public Attributes | List of all members
XmlRpc::XmlRpcSocket Class Reference

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
 

Detailed Description

A platform-independent socket API.

Definition at line 23 of file XmlRpcSocket.h.

Member Function Documentation

◆ accept()

int XmlRpcSocket::accept ( int  socket)
static

Accept a client connection request.

Definition at line 181 of file XmlRpcSocket.cpp.

◆ bind()

bool XmlRpcSocket::bind ( int  socket,
int  port 
)
static

Bind to a specified port.

Definition at line 143 of file XmlRpcSocket.cpp.

◆ close()

void XmlRpcSocket::close ( int  socket)
static

Closes a socket.

Definition at line 107 of file XmlRpcSocket.cpp.

◆ connect()

bool XmlRpcSocket::connect ( int  socket,
const std::string &  host,
int  port 
)
static

Connect a socket to a server (from a client)

Definition at line 200 of file XmlRpcSocket.cpp.

◆ get_port()

int XmlRpcSocket::get_port ( int  socket)
static

Definition at line 386 of file XmlRpcSocket.cpp.

◆ getError()

int XmlRpcSocket::getError ( )
static

Returns last errno.

Definition at line 356 of file XmlRpcSocket.cpp.

◆ getErrorMsg() [1/2]

std::string XmlRpcSocket::getErrorMsg ( )
static

Returns message corresponding to last error.

Definition at line 368 of file XmlRpcSocket.cpp.

◆ getErrorMsg() [2/2]

std::string XmlRpcSocket::getErrorMsg ( int  error)
static

Returns message corresponding to error.

Definition at line 375 of file XmlRpcSocket.cpp.

◆ listen()

bool XmlRpcSocket::listen ( int  socket,
int  backlog 
)
static

Set socket in listen mode.

Definition at line 174 of file XmlRpcSocket.cpp.

◆ nbRead()

bool XmlRpcSocket::nbRead ( int  socket,
std::string &  s,
bool *  eof 
)
static

Read text from the specified socket. Returns false on error.

Definition at line 293 of file XmlRpcSocket.cpp.

◆ nbWrite()

bool XmlRpcSocket::nbWrite ( int  socket,
const std::string &  s,
int *  bytesSoFar 
)
static

Write text to the specified socket. Returns false on error.

Definition at line 326 of file XmlRpcSocket.cpp.

◆ setNonBlocking()

bool XmlRpcSocket::setNonBlocking ( int  socket)
static

Sets a stream (TCP) socket to perform non-blocking IO. Returns false on failure.

Definition at line 121 of file XmlRpcSocket.cpp.

◆ setReuseAddr()

bool XmlRpcSocket::setReuseAddr ( int  socket)
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 133 of file XmlRpcSocket.cpp.

◆ socket()

int XmlRpcSocket::socket ( )
static

Creates a stream (TCP) socket. Returns -1 on failure.

Definition at line 99 of file XmlRpcSocket.cpp.

Member Data Documentation

◆ s_use_ipv6_

bool XmlRpcSocket::s_use_ipv6_ = false
static

Definition at line 26 of file XmlRpcSocket.h.


The documentation for this class was generated from the following files:


xmlrpcpp
Author(s): Chris Morley, Konstantin Pilipchuk, Morgan Quigley, Austin Hendrix
autogenerated on Thu Apr 25 2019 02:30:42