powered by Jive Software

Socketfactory

hi i’‘ve been having a bit of a problem getting connected to the server from another machine, i’‘m getting an error saying its getting bounced, it works fine when i run my client from the same machine but as soon as i run it over the newtork i get a problem, i’'m using JabberD 1.4 as a server,

i know you need to use the server name not address so i still try to call localhost from the other machine, is this right,

Anybody have any ideas

Thanks

Bob

Hey Bob,

The name that you are passing as a parameter to the XMPPConnection constructor is what Smack will use to connect with. This means that by default Smack will try to open a socket to the host that you specified on the port 5222. So if you are passing “localhost” then Smack will try to open a connection to the same computer that is running Smack. Note: Usually localhost is mapped to 127.0.0.1.

One way to easily test the connection is to use telnet. You can try this from a command prompt: telnet 5222. If telnet is able to connect to the desired host then Smack will be able too.

Regards,

– Gato

Thanks Gato,

I’'ll give that a try,

bob

Hi Gato,

I tried that and i got connected with telnet no problem on three different occasions, with the computer name, ipddress and Localhost, but when i tried to connect with smack i couldn’'t connect at all, What could be the problem do you think?

Hi i got that fixed anyway,

the problem was with the server i was using, it was jabberd 1.4 and looking back on it i have to say it is quiet bad, i switched to EJabberd and it worked perfectly immediately

Thanks Anyway

Bob