diff options
| author | 2020-07-20 07:21:16 +0100 | |
|---|---|---|
| committer | 2020-07-20 07:21:16 +0100 | |
| commit | f73d200a1ea56aa68ee5df3935eb83e04537c59f (patch) | |
| tree | 5d539d81502968cdf3b1aba249bd5dd4ecffff45 /include | |
| parent | Merge branch 'insp3' into master. (diff) | |
| download | inspircd++-f73d200a1ea56aa68ee5df3935eb83e04537c59f.tar.gz inspircd++-f73d200a1ea56aa68ee5df3935eb83e04537c59f.tar.bz2 inspircd++-f73d200a1ea56aa68ee5df3935eb83e04537c59f.zip | |
Split OnSetEndPoint into two events.
Diffstat (limited to 'include')
| -rw-r--r-- | include/inspsocket.h | 13 | ||||
| -rw-r--r-- | include/users.h | 3 |
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. |
