Cannot connect

Post here all your questions related with SmartFoxServer Java API

Moderators: Lapo, Bax

witchfinder
Posts: 1
Joined: 25 Oct 2010, 11:54

Cannot connect

Postby witchfinder » 23 Nov 2010, 10:22

I'm trying to create simple java client to test my server extension.
Hovewer I got stuck in the very beginning - i cant even connect
Here is my piece of code:

Code: Select all

package bottest;

import it.gotoandplay.smartfoxclient.SmartFoxClient;

public class BotTest {

   public static void main(String[] args) {
      SmartFoxClient s = new SmartFoxClient(true);
      s.connect("127.0.0.1");
   }

}


Here is console output - no usual connection strings here:

Code: Select all

14:45:55.511 [SocketConnectorIoProcessor-0.0] DEBUG o.a.m.filter.executor.ExecutorFilter - Launching thread for /127.0.0.1:9339
23.11.2010 14:45:55 it.gotoandplay.smartfoxclient.SmartFoxClient debugMessage
INFO: [Sending]: <msg t ='sys'><body action='verChk' r='0'><ver v='158' /></body></msg>
23.11.2010 14:45:55 it.gotoandplay.smartfoxclient.SmartFoxClient debugMessage
INFO: [ RECEIVED ]: <cross-domain-policy><allow-access-from domain='*' to-ports='9339' /></cross-domain-policy>, (len: 91)
14:45:55.553 [AnonymousIoService-1] DEBUG o.a.m.filter.executor.ExecutorFilter - Exiting since queue is empty for /127.0.0.1:9339
23.11.2010 14:45:55 it.gotoandplay.smartfoxclient.SmartFoxClient debugMessage
INFO: [ RECEIVED ]: <msg t='sys'><body action='apiOK' r='0'></body></msg>, (len: 53)

SmartfoxJChat example works fine for me.
What is wrong with my code?

Return to “Java2SE / Android Client API”

Who is online

Users browsing this forum: No registered users and 1 guest