First, here’'s my code. For the GUI I am using JFrame.
try {
con= new XMPPConnection(“im102”,5222); //machine to connect to
con.login(user,pass);
chat=con.createChat(“phil@im167/Smack”);
textarea.append(“Connection Successful\nYou are logged in as “user”\n”);
chat.sendMessage(“Sup”);[/b]
}catch (XMPPException e) {
e.getXMPPError();
}
/code
The bold statement is never getting sent to my client, which is logged on via the Spark client. I do have a PacketListener call so I can receive messages from the Spark client. This is boggling my mind, any suggestions?
Also, attempting to create another connection to another user is making my gui freeze up. I have read that perhaps I need to spawn threads to deal with connections, can someone please post up an example? I have very little experience with threads and what resources they share with the main program.
I would then check the debugger window and check to see if the message packet is being sent from your client. If it is have a look at the “to” attribute and see what the JID address is.
Compare it with the fully qualified JID of the client logged into Spark.