[swift-users] isAvailable( ) not evaluating to true...

Marc Neeley neeleym at ociweb.com
Wed Feb 29 18:47:32 CET 2012


Hi,

   I've been experimenting with the Swift C++ client library and have the
following snippet of code that doesn't seem to want to execute on the 'true'
side of the Boolean.

When the client code does connect, I see that the onConnected handler does
execute and a presence indicator does get sent to an OpenFire server. I see
it in my Pidgin client.

If the connect is working, then why is the isAvailable() not resolving to
true?  Any help would be appreciated.

 

Marc

 

 

XMPPclient_->connect(); 

 

  if (XMPPclient_->isAvailable()) {

 

       boost::shared_ptr<Swift::Message> xmppMsg(new Swift::Message());

       xmppMsg->setTo("marc at myhost");

       xmppMsg->setFrom(XMPPclient_->getJID());

       xmppMsg->setBody("This is a new message...");

       XMPPclient_->sendMessage(xmppMsg);

  } else {

         std::cout << "XMPP server is not available...can't send message" <<
std::endl;

  }

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: </lists/pipermail/swift-users/attachments/20120229/29717c1f/attachment.html>


More information about the swift-users mailing list