Page 1 of 1

PostPosted: Wed Sep 20, 2006 4:24 am
by lazarus
Is the socket/network library supported on the Palm TX device. Whenever I try the socket connect method, I get a netErrSocketBusy (= 4617) error. The code follows. Note that I tried calling the method a few times just in case. I also tried sniffing the wireless traffic and saw no TCP packets packets coming from this device. The app did start the DHCP exchange to get the ip address as seen in the captured packets.

Socket s;
Network net;

// Declare functions.
void vSendCommandToServer (string);
string szGetServerResponse ();

handler mainForm.onopen() {
int err;
int index;

err = net.open();

if (err != 0) {
alert ("Unable to open network, err = " + err);
return;
}

err = s.open(netAfInet, netSockStream, netProtoIpTcp);

if (err == 0) {
s.listen(1);
for (index = 0 ; index < 4 ; index++) {
// Connect to the server.
err = s.connect("192.168.1.100:3000");
if (err != 0) {
alert ("Unable to connect, err = " + err);
}
}
} else {
alert ("Unable to open socket, err = " + err);
}
}

PostPosted: Tue Sep 26, 2006 3:42 am
by dewey
When the socket is open for listening (a server socket), you can't use it to connect (a client socket).

Do you have a server running on port 3000?