urgent: Palm OS Emulator and netlib
Posted on 2003-03-02
I want to do the following:
connect -> receive hello from server -> send auth to server -> receive response from server -> send goodbye to server -> disconnect
// connect: ok
NetLibSocketConnect(libRef, socket, (NetSocketAddrType*)&srvAddr, sizeof(srvAddr), SOCKET_TIMEOUT, &err);
// Receive from server: ok
NetLibReceive(libRef, socket, (void*)&inBuf, inBufLen, 0, 0, 0, SOCKET_TIMEOUT, err);
// send something to server: ok (no error)
NetLibSend(libRef, socket, (void*)&outBuf, 7, netIOFlagOutOfBand, 0, 0, SOCKET_TIMEOUT, &err);
// receive from server: netErrSocketClosedByRemote (4628)
NetLibReceive(libRef, socket, (void*)&inBuf, 6, 0, 0, 0, SOCKET_TIMEOUT, err);
For real servers, I get netErrSocketClosedByRemote for the second call of NetLibReceive. It just can be solved by changing the server to localhost (127.0.0.1).
How can I solve this problem? I am using Palm OS Emulator and my PC is connected to internet using broadband (ethernet NIC). I don't have any cradle and modem.
Is there anything that I should set for the emulator and any software needed so that I can make my program work for the real servers (i.e. not 127.0.0.1)?