powered by Jive Software

Sample code please

Hi,

I try to develop a little multi user chat with xmpp. I want to use openfire as a server, and a small application with smack librairy as a client. Can you give me a sample code wich permit some users to connect to my openfire server and chat together?

Thank you very much.

Regards

hi

Under Projects->Smack there is some documentation and little first-step documents.

You also could take a look into the Spark source.

hi!

thank you for your help. I have already tried to find some code, and I have a little program, so I have two specific questions:

on my openfire server, I defined a multiuserchat adress (example@conference.194.XXX.XXX.XXX)

in my client program, I invoke MultiUserChat muc = new MultiUserChat(connection,. "example@conference.194.XXX.XXX.XXX" )

Where is the problem? Everything seems ok?

Then, when an user calls muc.sendMessage, how can I see these messages?? and also messages from all users connected to “muc”?

Thank you

regards

You can listen out for messages in a MUC the same way you do in any normal chat

**MultiUserChat#addMessageListener**(PacketListener listener)

Thank you Jon, but I can’t carry out the listener… Can you help me please?

What to do with this method?

Thank you,

rgds

Answered, thank you