aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/inspsocket.h13
-rw-r--r--include/users.h3
2 files changed, 11 insertions, 5 deletions
diff --git a/include/inspsocket.h b/include/inspsocket.h
index aa6194794..623720f97 100644
--- a/include/inspsocket.h
+++ b/include/inspsocket.h
@@ -323,12 +323,17 @@ class CoreExport StreamSocket : public EventHandler
/** Called when the socket gets an error from socket engine or IO hook */
virtual void OnError(BufferedSocketError e) = 0;
- /** Called when the endpoint addresses are changed.
- * @param local The new local endpoint.
- * @param remote The new remote endpoint.
+ /** Called when the local endpoint address is changed.
+ * @param ep The new local endpoint.
* @return true if the connection is still open, false if it has been closed
*/
- virtual bool OnSetEndPoint(const irc::sockets::sockaddrs& local, const irc::sockets::sockaddrs& remote);
+ virtual bool OnSetLocalEndPoint(const irc::sockets::sockaddrs& ep) { return true; }
+
+ /** Called when the remote endpoint address is changed.
+ * @param ep The new remote endpoint.
+ * @return true if the connection is still open, false if it has been closed
+ */
+ virtual bool OnSetRemoteEndPoint(const irc::sockets::sockaddrs& ep) { return true; }
/** Send the given data out the socket, either now or when writes unblock
*/
diff --git a/include/users.h b/include/users.h
index eeec0295a..d336478fc 100644
--- a/include/users.h
+++ b/include/users.h
@@ -634,7 +634,8 @@ class CoreExport UserIOHandler : public StreamSocket
{
}
void OnDataReady() override;
- bool OnSetEndPoint(const irc::sockets::sockaddrs& local, const irc::sockets::sockaddrs& remote) override;
+ bool OnSetLocalEndPoint(const irc::sockets::sockaddrs& ep) override;
+ bool OnSetRemoteEndPoint(const irc::sockets::sockaddrs& ep) override;
void OnError(BufferedSocketError error) override;
/** Adds to the user's write buffer.