00001 #ifndef _XMLRPCSOCKET_H_
00002 #define _XMLRPCSOCKET_H_
00003
00004
00005
00006 #if defined(_MSC_VER)
00007 # pragma warning(disable:4786) // identifier was truncated in debug info
00008 #endif
00009
00010 #ifndef MAKEDEPEND
00011 # include <string>
00012 #endif
00013
00014 namespace XmlRpc {
00015
00017 class XmlRpcSocket {
00018 public:
00019
00021 static int socket();
00022
00024 static void close(int socket);
00025
00026
00028 static bool setNonBlocking(int socket);
00029
00031 static bool nbRead(int socket, std::string& s, bool *eof);
00032
00034 static bool nbWrite(int socket, std::string& s, int *bytesSoFar);
00035
00036
00037
00038
00041 static bool setReuseAddr(int socket);
00042
00044 static bool bind(int socket, int port);
00045
00047 static bool listen(int socket, int backlog);
00048
00050 static int accept(int socket);
00051
00052
00054 static bool connect(int socket, std::string& host, int port);
00055
00056
00058 static int getError();
00059
00061 static std::string getErrorMsg();
00062
00064 static std::string getErrorMsg(int error);
00065 };
00066
00067 }
00068
00069 #endif