summaryrefslogtreecommitdiff
path: root/louloulibs/xmpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-11-11 02:54:48 +0100
committerlouiz’ <louiz@louiz.org>2016-11-11 02:54:48 +0100
commit0c8adc85f7373a85de8b3edc6cac87d5f7389bb3 (patch)
treeaefa90f4325424716b1304b4eac42d43371df1ca /louloulibs/xmpp
parentc41d003cbf3b14b83e0f9bf6c4787c3bd60bb7ee (diff)
downloadbiboumi-0c8adc85f7373a85de8b3edc6cac87d5f7389bb3.tar.gz
biboumi-0c8adc85f7373a85de8b3edc6cac87d5f7389bb3.tar.bz2
biboumi-0c8adc85f7373a85de8b3edc6cac87d5f7389bb3.tar.xz
biboumi-0c8adc85f7373a85de8b3edc6cac87d5f7389bb3.zip
Move all the connect() logic from TCPSocketHandler into a subclass
This way, TCPSocketHandler only deal with the message sending/receiving, not the connect() or anything else. This will be used for implementing servers (because when a client is accepted, we don’t need all the connect() and dns resolution stuff).
Diffstat (limited to 'louloulibs/xmpp')
-rw-r--r--louloulibs/xmpp/xmpp_component.cpp2
-rw-r--r--louloulibs/xmpp/xmpp_component.hpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/louloulibs/xmpp/xmpp_component.cpp b/louloulibs/xmpp/xmpp_component.cpp
index fa8b0a5..1d1c58b 100644
--- a/louloulibs/xmpp/xmpp_component.cpp
+++ b/louloulibs/xmpp/xmpp_component.cpp
@@ -39,7 +39,7 @@ static std::set<std::string> kickable_errors{
};
XmppComponent::XmppComponent(std::shared_ptr<Poller> poller, const std::string& hostname, const std::string& secret):
- TCPSocketHandler(poller),
+ TCPClientSocketHandler(poller),
ever_auth(false),
first_connection_try(true),
secret(secret),
diff --git a/louloulibs/xmpp/xmpp_component.hpp b/louloulibs/xmpp/xmpp_component.hpp
index 5f5f937..e3f8ce2 100644
--- a/louloulibs/xmpp/xmpp_component.hpp
+++ b/louloulibs/xmpp/xmpp_component.hpp
@@ -2,7 +2,7 @@
#include <xmpp/adhoc_commands_handler.hpp>
-#include <network/tcp_socket_handler.hpp>
+#include <network/tcp_client_socket_handler.hpp>
#include <xmpp/xmpp_parser.hpp>
#include <xmpp/body.hpp>
@@ -40,7 +40,7 @@
*
* TODO: implement XEP-0225: Component Connections
*/
-class XmppComponent: public TCPSocketHandler
+class XmppComponent: public TCPClientSocketHandler
{
public:
explicit XmppComponent(std::shared_ptr<Poller> poller, const std::string& hostname, const std::string& secret);