diff --git a/Socket/Protocols/INet/TCPSocketProtocol.cc b/Socket/Protocols/INet/TCPSocketProtocol.cc index 5f49a449831e1f863e34cc04b9b0cc09137a9dd2..3c88242d69b28924b4f4613fa1293075bd2d340e 100644 --- a/Socket/Protocols/INet/TCPSocketProtocol.cc +++ b/Socket/Protocols/INet/TCPSocketProtocol.cc @@ -83,7 +83,6 @@ prefix_ void senf::TCPSocketProtocol::shutdown(ShutType type) } prefix_ void senf::TCPSocketProtocol::close() - const { shutdown(ShutRDWR); INetSocketProtocol::close(); diff --git a/Socket/Protocols/INet/TCPSocketProtocol.hh b/Socket/Protocols/INet/TCPSocketProtocol.hh index 91021a02f5269ef29f941eded50948f5ba728acd..cca471ea78328d685552fc237bd24b0d270359b2 100644 --- a/Socket/Protocols/INet/TCPSocketProtocol.hh +++ b/Socket/Protocols/INet/TCPSocketProtocol.hh @@ -66,7 +66,7 @@ namespace senf { ///\name Abstract Interface Implementation ///@{ - void close() const; + void close(); unsigned available() const; bool eof() const; diff --git a/Socket/Protocols/UN/UNSocketProtocol.cc b/Socket/Protocols/UN/UNSocketProtocol.cc index 85266bdcd2503b28cbcd17ece2cfcbd2b18a38f5..9a4075cace48b99141d103451852c4afdd6c00d4 100644 --- a/Socket/Protocols/UN/UNSocketProtocol.cc +++ b/Socket/Protocols/UN/UNSocketProtocol.cc @@ -53,7 +53,6 @@ prefix_ bool senf::UNSocketProtocol::eof() } prefix_ void senf::UNSocketProtocol::close() - const { check_and_unlink(); diff --git a/Socket/Protocols/UN/UNSocketProtocol.hh b/Socket/Protocols/UN/UNSocketProtocol.hh index fc56f1be9521d99dbc95b7d13b4a7058f8b8a064..83bd3d108f61ebdfa991c7ecf783aad8903c77fa 100644 --- a/Socket/Protocols/UN/UNSocketProtocol.hh +++ b/Socket/Protocols/UN/UNSocketProtocol.hh @@ -49,10 +49,10 @@ namespace senf { : public virtual SocketProtocol { public: - virtual void close() const; ///< Close socket - /**< This override will automatically \c shutdown() the - socket whenever it is closed. - \throws senf::SystemException */ + virtual void close(); ///< Close socket + /**< This override will automatically \c shutdown() the + socket whenever it is closed. + \throws senf::SystemException */ // virtual void terminate() const; ///< Forcibly close socket /**< This override will automatically \c shutdown() the socket whenever it is called. Additionally it will diff --git a/Socket/SocketProtocol.cc b/Socket/SocketProtocol.cc index 5e15222aa45c71b52ae53aaf4403ad5b6108a783..3a1fac50a19b1b5abd3966e40a4f2f0c959933f7 100644 --- a/Socket/SocketProtocol.cc +++ b/Socket/SocketProtocol.cc @@ -35,7 +35,6 @@ ///////////////////////////////cc.p//////////////////////////////////////// prefix_ void senf::SocketProtocol::close() - const { if (::close(body().fd()) < 0) SENF_THROW_SYSTEM_EXCEPTION("::close(socket_fd)"); diff --git a/Socket/SocketProtocol.hh b/Socket/SocketProtocol.hh index 759031283fb5871dfcc206bbd9a12d81909e7efc..b41fccb8b05e182579462235abe3db3a3e5f30d0 100644 --- a/Socket/SocketProtocol.hh +++ b/Socket/SocketProtocol.hh @@ -168,7 +168,7 @@ namespace senf { not support the notion of EOF, this member should always return \c false. */ - virtual void close() const; ///< Close socket + virtual void close(); ///< Close socket /**< This override will automatically \c shutdown() the socket whenever it is closed. \throws senf::SystemException diff --git a/Socket/SocketProtocol.test.hh b/Socket/SocketProtocol.test.hh index 497cff16ff99d020a4849b746243383781286abe..d03e6df92d1c24ae35177869b975ab7d11bf42ee 100644 --- a/Socket/SocketProtocol.test.hh +++ b/Socket/SocketProtocol.test.hh @@ -48,7 +48,7 @@ namespace test { bool eof() const { return false; } - virtual void close() const { + virtual void close() { closeCount(1); }