diff options
author | Florent Le Coz <louiz@louiz.org> | 2014-07-02 03:01:09 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2014-07-02 03:01:09 +0200 |
commit | 04d999168ac4629f5e49939f3659b32b2da2563d (patch) | |
tree | df11fefd719aaa82a7d20f53dd01894770b64eba /src/xmpp | |
parent | b0ae8c66e34cd253b97da09ef0aaca9261e022a2 (diff) | |
download | biboumi-04d999168ac4629f5e49939f3659b32b2da2563d.tar.gz biboumi-04d999168ac4629f5e49939f3659b32b2da2563d.tar.bz2 biboumi-04d999168ac4629f5e49939f3659b32b2da2563d.tar.xz biboumi-04d999168ac4629f5e49939f3659b32b2da2563d.zip |
Add a level of inheritance above SocketHandler
SocketHandler has been renamed to TCPSocketHandler
SocketHandler is now a simple interface with a few methods, used only by
Poller.
This way we can inherite from the new SocketHandler class, to handle other
types of sockets, and still make them manageable by the poller without any
change in the Poller class.
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/xmpp_component.cpp | 2 | ||||
-rw-r--r-- | src/xmpp/xmpp_component.hpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/xmpp/xmpp_component.cpp b/src/xmpp/xmpp_component.cpp index 1e8f9e0..51d65aa 100644 --- a/src/xmpp/xmpp_component.cpp +++ b/src/xmpp/xmpp_component.cpp @@ -37,7 +37,7 @@ static std::set<std::string> kickable_errors{ }; XmppComponent::XmppComponent(std::shared_ptr<Poller> poller, const std::string& hostname, const std::string& secret): - SocketHandler(poller), + TCPSocketHandler(poller), ever_auth(false), last_auth(false), served_hostname(hostname), diff --git a/src/xmpp/xmpp_component.hpp b/src/xmpp/xmpp_component.hpp index ce594ec..42cdb8a 100644 --- a/src/xmpp/xmpp_component.hpp +++ b/src/xmpp/xmpp_component.hpp @@ -2,7 +2,7 @@ # define XMPP_COMPONENT_INCLUDED #include <xmpp/adhoc_commands_handler.hpp> -#include <network/socket_handler.hpp> +#include <network/tcp_socket_handler.hpp> #include <xmpp/xmpp_parser.hpp> #include <bridge/bridge.hpp> @@ -30,7 +30,7 @@ * * TODO: implement XEP-0225: Component Connections */ -class XmppComponent: public SocketHandler +class XmppComponent: public TCPSocketHandler { public: explicit XmppComponent(std::shared_ptr<Poller> poller, const std::string& hostname, const std::string& secret); |