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
00027 static int socket();
00028
00030 static void close(int socket);
00031
00032
00034 static bool setNonBlocking(int socket);
00035
00037 static bool nbRead(int socket, std::string& s, bool *eof);
00038
00040 static bool nbWrite(int socket, std::string& s, int *bytesSoFar);
00041
00042
00043
00044
00047 static bool setReuseAddr(int socket);
00048
00050 static bool bind(int socket, int port);
00051
00052 static int get_port(int socket);
00053
00055 static bool listen(int socket, int backlog);
00056
00058 static int accept(int socket);
00059
00060
00061
00063 static bool connect(int socket, std::string& host, int port);
00064
00065
00067 static int getError();
00068
00070 static std::string getErrorMsg();
00071
00073 static std::string getErrorMsg(int error);
00074 };
00075
00076 }
00077
00078 #endif