From 0c7d37a8e3d7bba08a7f8614b7824d732ddb8a9d Mon Sep 17 00:00:00 2001 From: Fred Nicolson Date: Tue, 1 Aug 2017 17:25:53 +0100 Subject: [PATCH] Moved set_remote_address from TcpSocket to Socket So that SSLSocket has it to. Though the SSLListener still needs to set the remote address after accepting a new connection. --- include/frnetlib/Socket.h | 10 ++++++++++ include/frnetlib/TcpSocket.h | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/frnetlib/Socket.h b/include/frnetlib/Socket.h index 413f95b..d84c62d 100644 --- a/include/frnetlib/Socket.h +++ b/include/frnetlib/Socket.h @@ -83,6 +83,16 @@ namespace fr return remote_address; } + /*! + * Sets the connections remote address. + * + * @param addr The remote address to use + */ + void set_remote_address(const std::string &addr) + { + remote_address = addr; + } + /*! * Sets the socket to blocking or non-blocking. * diff --git a/include/frnetlib/TcpSocket.h b/include/frnetlib/TcpSocket.h index a4dc83b..ff3b42b 100644 --- a/include/frnetlib/TcpSocket.h +++ b/include/frnetlib/TcpSocket.h @@ -67,16 +67,6 @@ public: */ virtual Status receive_raw(void *data, size_t buffer_size, size_t &received) override; - /*! - * Sets the connections remote address. - * - * @param addr The remote address to use - */ - void set_remote_address(const std::string &addr) - { - remote_address = addr; - } - /*! * Sets if the socket should be blocking or non-blocking. *