diff options
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/xmpp_component.cpp | 4 | ||||
-rw-r--r-- | src/xmpp/xmpp_component.hpp | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/xmpp/xmpp_component.cpp b/src/xmpp/xmpp_component.cpp index 7810499..433f87a 100644 --- a/src/xmpp/xmpp_component.cpp +++ b/src/xmpp/xmpp_component.cpp @@ -46,9 +46,9 @@ XmppComponent::~XmppComponent() { } -void XmppComponent::start() +bool XmppComponent::start() { - this->connect("127.0.0.1", "5347"); + return this->connect("127.0.0.1", "5347"); } void XmppComponent::send_stanza(const Stanza& stanza) diff --git a/src/xmpp/xmpp_component.hpp b/src/xmpp/xmpp_component.hpp index 15f8f2f..1a7fc6b 100644 --- a/src/xmpp/xmpp_component.hpp +++ b/src/xmpp/xmpp_component.hpp @@ -25,9 +25,10 @@ public: void parse_in_buffer() override final; /** - * Connect to the XMPP server + * Connect to the XMPP server. + * Returns false if we failed to connect */ - void start(); + bool start(); /** * Serialize the stanza and add it to the out_buf to be sent to the * server. |