views:

247

answers:

3

What type of stream I need to use to write a connect request message over a tcp socket, to jabber. I'mwriting a string with xml format. It should worked with the default socket stream or a dataoutputstream but it doesn't.

+1  A: 

You may want to try Openfire (formerly Wildfire). It uses the only widely adopted open protocol for instant messaging, XMPP (also called Jabber).

Take a look here or for the source here

Burkhard
A: 

Jabber is a pretty comprehensive protocol, so I don't think it's really analogous to opening a stream. On the other hand, it's a very well supported protocol, so you have your choice of libraries to help. Here is a link to the relevant information on jabber.org.

Steve Moyer
+4  A: 

Use the Smack client library to connect to a Jabber server, such as OpenFire. It is quite simple to use, you can connect and send/receive messages in a few lines of code.

Robin
+1 on Smack. Easy-to-use, simple, feature-rich, works well. Very happy with it.
Cowan