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)
}
prefix_ void senf::TCPSocketProtocol::close()
const
{
shutdown(ShutRDWR);
INetSocketProtocol::close();
......
......@@ -66,7 +66,7 @@ namespace senf {
///\name Abstract Interface Implementation
///@{
void close() const;
void close();
unsigned available() const;
bool eof() const;
......
......@@ -53,7 +53,6 @@ prefix_ bool senf::UNSocketProtocol::eof()
}
prefix_ void senf::UNSocketProtocol::close()
const
{
check_and_unlink();
......
......@@ -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
......
......@@ -35,7 +35,6 @@
///////////////////////////////cc.p////////////////////////////////////////
prefix_ void senf::SocketProtocol::close()
const
{
if (::close(body().fd()) < 0)
SENF_THROW_SYSTEM_EXCEPTION("::close(socket_fd)");
......
......@@ -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
......
......@@ -48,7 +48,7 @@ namespace test {
bool eof() const
{ return false; }
virtual void close() const {
virtual void close() {
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