Go to the documentation of this file.00001
00002
00003
00004
00005 #ifndef _XMLRPCSOCKET_H_
00006 #define _XMLRPCSOCKET_H_
00007
00008
00009
00010 #if defined(_MSC_VER)
00011 # pragma warning(disable:4786) // identifier was truncated in debug info
00012 #endif
00013
00014 #ifndef MAKEDEPEND
00015 # include <string>
00016 #endif
00017
00018 #include "XmlRpcDecl.h"
00019
00020 namespace XmlRpc {
00021
00023 class XMLRPCPP_DECL XmlRpcSocket {
00024 public:
00025
00026 static bool s_use_ipv6_;
00027
00029 static int socket();
00030
00032 static void close(int socket);
00033
00034
00036 static bool setNonBlocking(int socket);
00037
00039 static bool nbRead(int socket, std::string& s, bool *eof);
00040
00042 static bool nbWrite(int socket, std::string& s, int *bytesSoFar);
00043
00044
00045
00046
00049 static bool setReuseAddr(int socket);
00050
00052 static bool bind(int socket, int port);
00053
00054 static int get_port(int socket);
00055
00057 static bool listen(int socket, int backlog);
00058
00060 static int accept(int socket);
00061
00062
00063
00065 static bool connect(int socket, std::string& host, int port);
00066
00067
00069 static int getError();
00070
00072 static std::string getErrorMsg();
00073
00075 static std::string getErrorMsg(int error);
00076 };
00077
00078 }
00079
00080 #endif