I'm trying to create a server socket (using Treo 650) but I'm not getting 
success! Here is part of my code:

   socketRef = NetLibSocketOpen(netSocketAddrINET, netSocketTypeStream, 
netSocketProtoIPTCP, wait, &err);
   if (err != errNone)
      return err;

   NetLibSocketBind(socketRef, (NetSocketAddrType*) &addrIN, sizeof(addrIN), 
wait, &err);
   if (err != errNone)
      return err;

   NetLibSocketOptionSet(socketRef, netSocketOptLevelSocket, 
netSocketOptSockNonBlocking, &Value, sizeof(Value), wait, &err);
   if (err != errNone)
      return err;

   NetLibSocketOptionSet(socketRef, netSocketOptLevelTCP, 
netSocketOptTCPNoDelay, &Value, sizeof(Value), wait, &err);
   if (err != errNone)
      return err;

   NetLibSocketListen(socketRef, backlog, wait, &err);
   if (err != errNone)
      return err;
    
   // That's how I'm getting the IP address
   if((err = NetLibSettingGet(netIFSettingActualIPAddr, &dhcpPPPAddress, 
&bufSize)) == errNone)
      alert("%d", dhcpPPPAddress);
   NetLibAddrINToA(dhcpPPPAddress, buf);
   alert(buf);

   I get the IP Address here and try to connect to it, using a Java program, 
but I get the exception java.net.ConnectException: Connection timed out: 
connect. 
   All the functions above are working (they're returning errNone), but I don't 
know how to test it, to make sure that's working well! What about the 
NetLibSocketAccept? Shouldn't I use it too?
   Can anybody help me? Thanksssssssssss in advance!:) 

    Kelly
    
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to