powered by Jive Software

How to get messages in real time?


I am making a chat client, and I want to start the foundation before the GUI. I want to know how to run the bare bones problem in real time to get messages. Right now, it connects to xmpp, sets a message to a set user, and ends. I want to to know : when I hit run in my compiler, I want it to just sit there and wait for a message. Once my friend sends a message, I want it to appear in my program’s console. I have tried several things but nothing worked. Thanks.


reading http://www.igniterealtime.org/builds/smack/docs/latest/documentation/processing. html may help. You must be connected to the XMPP server to receive messages.


Hey thanks for the reply. However, I tried exactly that and it did not work. Can you make a code that works? I must be doing something wrong when coding it. I do not get any compile errors, it’s just that it doesn’t receive messages real time like a normal chat client. Thanks.


This might sound like a basic questions, but do you have a thread or loop that keeps your program from exiting?