XmlRpcSocket.h
Go to the documentation of this file.
1 // this file modified by Morgan Quigley on 22 Apr 2008.
2 // added features: server can be opened on port 0 and you can read back
3 // what port the OS gave you
4 
5 #ifndef _XMLRPCSOCKET_H_
6 #define _XMLRPCSOCKET_H_
7 //
8 // XmlRpc++ Copyright (c) 2002-2003 by Chris Morley
9 //
10 #if defined(_MSC_VER)
11 # pragma warning(disable:4786) // identifier was truncated in debug info
12 #endif
13 
14 #ifndef MAKEDEPEND
15 # include <string>
16 #endif
17 
18 #include "xmlrpcpp/XmlRpcDecl.h"
19 
20 namespace XmlRpc {
21 
24  public:
25 
26  static bool s_use_ipv6_;
27 
29  static int socket();
30 
32  static void close(int socket);
33 
34 
36  static bool setNonBlocking(int socket);
37 
39  static bool nbRead(int socket, std::string& s, bool *eof);
40 
42  static bool nbWrite(int socket, const std::string& s, int *bytesSoFar);
43 
44 
45  // The next four methods are appropriate for servers.
46 
49  static bool setReuseAddr(int socket);
50 
52  static bool bind(int socket, int port);
53 
54  static int get_port(int socket);
55 
57  static bool listen(int socket, int backlog);
58 
60  static int accept(int socket);
61 
62 
63 
65  static bool connect(int socket, const std::string& host, int port);
66 
67 
69  static int getError();
70 
72  static std::string getErrorMsg();
73 
75  static std::string getErrorMsg(int error);
76  };
77 
78 } // namespace XmlRpc
79 
80 #endif
XmlRpc::XmlRpcSocket::s_use_ipv6_
static bool s_use_ipv6_
Definition: XmlRpcSocket.h:26
s
XmlRpcServer s
Definition: HelloServer.cpp:11
XmlRpc
Definition: XmlRpcClient.h:20
XmlRpcDecl.h
XmlRpc::XmlRpcSocket
A platform-independent socket API.
Definition: XmlRpcSocket.h:23
XMLRPCPP_DECL
#define XMLRPCPP_DECL
Definition: XmlRpcDecl.h:52


xmlrpcpp
Author(s): Chris Morley, Konstantin Pilipchuk, Morgan Quigley, Austin Hendrix, Dirk Thomas , Jacob Perron
autogenerated on Thu Nov 23 2023 04:01:41