I’‘ve been programming PHP for about 2 years. I just started with Java about 2 weeks ago. It’‘s my first standalone, GUI, and OOP language. It’‘s been fun, but at the same time “brain frying”. I decided that for my first project I would write an Instant Messaging client and possibly server. I started out believing that it wouldn’'t be a big deal to create my own protocol based on XML. I was wrong.
So now I have decided just to write a jabber client and run a jabber server. This IM client will eventually be used for inter-office communications.
I found out about smack from jabber.org. It looks to be a good library for my specific needs, however, the documentation is severely lacking for a person of my skillset.
So far I have been able to write a little program that creates two connections, and one connection sends a message to the other. This works fine.
I have been fiddling around with it to see what happens if the user is not online or does not exist when I try to send the message. An XMPPException is not generated like I think it’'s supposed to - and in fact, nothing actually happens in the program at all. The PacketListener of course never sees it. I do get this message in my server log:
20030716T02:17:41: (synic): bouncing a packet to synic from jabberuser@localhost/Smack: Server Connect Failed
How do I find out if the packet was actually sent?