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.