XmlRpcSource.cpp
Go to the documentation of this file.
1 
4 #include "xmlrpcpp/XmlRpcUtil.h"
5 
6 namespace XmlRpc {
7 
8 
9  XmlRpcSource::XmlRpcSource(int fd /*= -1*/, bool deleteOnClose /*= false*/)
10  : _fd(fd), _deleteOnClose(deleteOnClose), _keepOpen(false)
11  {
12  }
13 
15  {
16  }
17 
18 
19  void
21  {
22  if (_fd != -1) {
23  XmlRpcUtil::log(2,"XmlRpcSource::close: closing socket %d.", _fd);
25  XmlRpcUtil::log(2,"XmlRpcSource::close: done closing socket %d.", _fd);
26  _fd = -1;
27  }
28  if (_deleteOnClose) {
29  XmlRpcUtil::log(2,"XmlRpcSource::close: deleting this");
30  _deleteOnClose = false;
31  delete this;
32  }
33  }
34 
35 } // namespace XmlRpc
virtual void close()
Close the owned fd. If deleteOnClose was specified at construction, the object is deleted...
XmlRpcSource(int fd=-1, bool deleteOnClose=false)
Definition: XmlRpcSource.cpp:9
static void close(int socket)
Closes a socket.
virtual ~XmlRpcSource()
Destructor.
static void log(int level, const char *fmt,...)
Dump messages somewhere.
Definition: XmlRpcUtil.cpp:81


xmlrpcpp
Author(s): Chris Morley, Konstantin Pilipchuk, Morgan Quigley, Austin Hendrix, Dirk Thomas
autogenerated on Mon Feb 28 2022 23:33:22