From 922cb5559b9f2f97279fa24cc9c5862c8b666495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Tue, 8 Mar 2005 10:23:43 +0000 Subject: This commit was generated by cvs2svn to compensate for changes in r2603, which included commits to RCS files with non-trunk default branches. svn path=/trunk/externals/iem/iemxmlrpc/; revision=2604 --- xmlrpc++/src/XmlRpcSource.cpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 xmlrpc++/src/XmlRpcSource.cpp (limited to 'xmlrpc++/src/XmlRpcSource.cpp') diff --git a/xmlrpc++/src/XmlRpcSource.cpp b/xmlrpc++/src/XmlRpcSource.cpp new file mode 100644 index 0000000..99203b0 --- /dev/null +++ b/xmlrpc++/src/XmlRpcSource.cpp @@ -0,0 +1,35 @@ + +#include "XmlRpcSource.h" +#include "XmlRpcSocket.h" +#include "XmlRpcUtil.h" + +namespace XmlRpc { + + + XmlRpcSource::XmlRpcSource(int fd /*= -1*/, bool deleteOnClose /*= false*/) + : _fd(fd), _deleteOnClose(deleteOnClose), _keepOpen(false) + { + } + + XmlRpcSource::~XmlRpcSource() + { + } + + + void + XmlRpcSource::close() + { + if (_fd != -1) { + XmlRpcUtil::log(2,"XmlRpcSource::close: closing socket %d.", _fd); + XmlRpcSocket::close(_fd); + XmlRpcUtil::log(2,"XmlRpcSource::close: done closing socket %d.", _fd); + _fd = -1; + } + if (_deleteOnClose) { + XmlRpcUtil::log(2,"XmlRpcSource::close: deleting this"); + _deleteOnClose = false; + delete this; + } + } + +} // namespace XmlRpc -- cgit v1.2.1