Skip to content
Snippets Groups Projects
Commit eac0711b authored by g0dil's avatar g0dil
Browse files

Socket: Make SocketProtocol::close() non-const (at least all other virtuals need to follow)

parent e72fe8de
No related branches found
No related tags found
No related merge requests found
...@@ -83,7 +83,6 @@ prefix_ void senf::TCPSocketProtocol::shutdown(ShutType type) ...@@ -83,7 +83,6 @@ prefix_ void senf::TCPSocketProtocol::shutdown(ShutType type)
} }
prefix_ void senf::TCPSocketProtocol::close() prefix_ void senf::TCPSocketProtocol::close()
const
{ {
shutdown(ShutRDWR); shutdown(ShutRDWR);
INetSocketProtocol::close(); INetSocketProtocol::close();
......
...@@ -66,7 +66,7 @@ namespace senf { ...@@ -66,7 +66,7 @@ namespace senf {
///\name Abstract Interface Implementation ///\name Abstract Interface Implementation
///@{ ///@{
void close() const; void close();
unsigned available() const; unsigned available() const;
bool eof() const; bool eof() const;
......
...@@ -53,7 +53,6 @@ prefix_ bool senf::UNSocketProtocol::eof() ...@@ -53,7 +53,6 @@ prefix_ bool senf::UNSocketProtocol::eof()
} }
prefix_ void senf::UNSocketProtocol::close() prefix_ void senf::UNSocketProtocol::close()
const
{ {
check_and_unlink(); check_and_unlink();
......
...@@ -49,10 +49,10 @@ namespace senf { ...@@ -49,10 +49,10 @@ namespace senf {
: public virtual SocketProtocol : public virtual SocketProtocol
{ {
public: public:
virtual void close() const; ///< Close socket virtual void close(); ///< Close socket
/**< This override will automatically \c shutdown() the /**< This override will automatically \c shutdown() the
socket whenever it is closed. socket whenever it is closed.
\throws senf::SystemException */ \throws senf::SystemException */ //
virtual void terminate() const; ///< Forcibly close socket virtual void terminate() const; ///< Forcibly close socket
/**< This override will automatically \c shutdown() the /**< This override will automatically \c shutdown() the
socket whenever it is called. Additionally it will socket whenever it is called. Additionally it will
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
///////////////////////////////cc.p//////////////////////////////////////// ///////////////////////////////cc.p////////////////////////////////////////
prefix_ void senf::SocketProtocol::close() prefix_ void senf::SocketProtocol::close()
const
{ {
if (::close(body().fd()) < 0) if (::close(body().fd()) < 0)
SENF_THROW_SYSTEM_EXCEPTION("::close(socket_fd)"); SENF_THROW_SYSTEM_EXCEPTION("::close(socket_fd)");
......
...@@ -168,7 +168,7 @@ namespace senf { ...@@ -168,7 +168,7 @@ namespace senf {
not support the notion of EOF, this member should not support the notion of EOF, this member should
always return \c false. */ always return \c false. */
virtual void close() const; ///< Close socket virtual void close(); ///< Close socket
/**< This override will automatically \c shutdown() the /**< This override will automatically \c shutdown() the
socket whenever it is closed. socket whenever it is closed.
\throws senf::SystemException \throws senf::SystemException
......
...@@ -48,7 +48,7 @@ namespace test { ...@@ -48,7 +48,7 @@ namespace test {
bool eof() const bool eof() const
{ return false; } { return false; }
virtual void close() const { virtual void close() {
closeCount(1); closeCount(1);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment