xmpp4r

Using the xmpp4r Ruby gem, how can I synchronously discover if a contact is online?

I'm new to XMPP and the xmpp4r library, so please forgive my noob question if this is obviously documented somewhere. What's the most straightforward way, in a synchronous manner, to find out if a given JID is online? (so that I can call something like is_online?(jid) in an if statement) My details: I'm writing a Sinatra app that wil...

How to get port number for iPhone Chatting Application

I am developing a chat application. But Right now chatting is possible with only google because I know only google's port no. xmppClient = [[XMPPClient alloc] init]; [xmppClient addDelegate:self]; // Replace me with the proper domain and port. // The example below is setup for a typical google talk account. [xmppClient setDomain:@"tal...

XMPP4R Callbacks dont seem to work

Im using xmpp4r and trying to get the hang of a basic chat feature that I wish to implement later in my Rails app. My fundamentals on Ruby Threads is still a bit shaky so I would appreciate any help on this. Though I register the callback i dont get a response from my gmail account. I am able to send a message but my ruby program termi...

Xmpp4r pubsub with gmail

I've got my xmpp server with which I intend to publish messages to my subscribers on the gmail server. I am able to get those messages when the subscriber belongs to my jabber server but when I try to publish messages the google users are unable to get the message. However I am able to fetch the messages using the pubsub.get_items_from(...

Sending and receiving IM messages via controller in Rails

Hi, I need a way to handle XMPP communication in my Rails app. My requirements are: Keep an instance of XMPP client running and logged in as one specific user (my bot user) Trigger an event from a controller to send a message and wait for a reply. The message is sent to another machine equipped with a bot so that the reply is sup...