Hi
I'm trying to do a simple MIDlet that connects to a server via a SocketConnection and reads some Strings from the corresponding DataInputStream. The program works fine when using the wtk emulator but on my n6600 the programm blocks forever as soon as it tries to read from the DataInputStream. I've tried read(), readChar(), readByte() and readUTF()... all are blocking
Is this some bug/problem with the n6600 or am i doing something wrong?
Here is some sample Code
Code:SocketConnection loginConn = (SocketConnection) Connector.open("socket://" + url + ":" + core.getServerPort()); DataOutputStream loginOs = loginConn.openDataOutputStream(); DataInputStream loginIs = loginConn.openDataInputStream(); loginOs.writeUTF("001"); statusMsg = "Trying to log in..."; core.updateUI(); String response = loginIs.readUTF(); //any code beyond this line wont be reached at all ....


Reply With Quote

