Hello, I have a problem, I still don't know as resolving it. I'm developing an application that it use socket to connect to server. I use the next code

public boolean connect(){
try{
socket = (SocketConnection)Connector.open("socket://"+server+":"+port,Connector.READ_WRITE);
is=socket.openInputStream();
os=socket.openOutputStream();
return true;
}
catch(IOException e){
return false;
}
}
The server is local.
I'm using netbeans 7.1.1 to develop my app. I downloaded nokia sdk 2.0, nokia sdk 1.1 and nokia sdk 1.0, and I have the same problem with the emulators. The error is javax.microedition.io.ConnectionNotFoundException: Bad host name. However with the netbeans emulators don't happens this error. I don't know if I have to set something in the emulator. Or I don't know if the emulator accepts SocketConnection, and perhaps accepts http, I don't know. I hope to find a solution.


thanks

In spanish:

Hola, Tengo un problema, Todavia nose como solucionarlo. Yo estoy desarrollando una aplicación que usa Socket para conectar al Servidor. Yo uso el siguiente codigo

public boolean connect(){
try{
socket = (SocketConnection)Connector.open("socket://"+server+":"+port,Connector.READ_WRITE);
is=socket.openInputStream();
os=socket.openOutputStream();
return true;
}
catch(IOException e){
return false;
}
}
El servidor es local.
Yo estoy usando netbeans 7.1.1 para desarrollar mi aplicación. Descargue nokia sdk 2.0, nokia sdk 1.1 and nokia sdk 1.0 y tengo el mismo problema con los emuladores. El error es javax.microedition.io.ConnectionNotFoundException: Bad host name. Sin embargo con los emuladores de netbeans no pasa este error. Nose si tengo que configurar algo en el emulador. O nose si el emulador acepta SocketConnection y quizas acepta http, nose.. Espero encontrar una solucion

Gracias
reggards.