XmlRpcSocket.h
Go to the documentation of this file.
00001 // this file modified by Morgan Quigley on 22 Apr 2008.
00002 // added features: server can be opened on port 0 and you can read back
00003 // what port the OS gave you
00004 
00005 #ifndef _XMLRPCSOCKET_H_
00006 #define _XMLRPCSOCKET_H_
00007 //
00008 // XmlRpc++ Copyright (c) 2002-2003 by Chris Morley
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     // The next four methods are appropriate for servers.
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 } // namespace XmlRpc
00077 
00078 #endif


xmlrpcpp
Author(s): Chris Morley and Konstantin Pilipchuk, slight modifications and ROS wrapping by Morgan Quigley
autogenerated on Sat Dec 28 2013 17:42:59