BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
XmlRpcSource.cpp
Go to the documentation of this file.
1
2#include "XmlRpcSource.h"
3#include "XmlRpcSocket.h"
4#include "XmlRpcUtil.h"
5
6namespace XmlRpc {
7
8 XmlRpcSource::XmlRpcSource( int fd /*= -1*/, bool deleteOnClose /*= false*/ )
9 : _fd( fd ), _deleteOnClose( deleteOnClose ), _keepOpen( false ) {}
10
12
14 if ( _fd != -1 )
15 {
16 XmlRpcUtil::log( 2, "XmlRpcSource::close: closing socket %d.", _fd );
18 XmlRpcUtil::log( 2, "XmlRpcSource::close: done closing socket %d.", _fd );
19 _fd = -1;
20 }
21 if ( _deleteOnClose )
22 {
23 XmlRpcUtil::log( 2, "XmlRpcSource::close: deleting this" );
24 _deleteOnClose = false;
25 delete this;
26 }
27 }
28
29} // namespace XmlRpc
static void close(int socket)
Closes a socket.
virtual void close()
virtual ~XmlRpcSource()
Destructor.
XmlRpcSource(int fd=-1, bool deleteOnClose=false)
static void log(int level, const char *fmt,...)
Dump messages somewhere.