I get the error netErrPrefNotFound when I attempt to connect to a socket.
Here is a clip of the code:

        int Socket_Desc;        // Socket File Descriptor
        struct sockaddr_in address;
        char SndRcvBuffer[25];
         
        Socket_Desc = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
        if (Socket_Desc == -1)
        {
                /* The socket failed to open. Put error on screem. */
                MyErrorFunc("Failed to open Socket");
                return;
        }
        
        memset ((char *) &address, 0, sizeof(address));
        address.sin_family = AF_INET;
        address.sin_port = 5555;
        address.sin_addr.s_addr = inet_addr("47.31.132.80");
        
        if (connect(Socket_Desc, &address, sizeof(address)) == -1)
        {               
                /* The socket failed to connect. Put error on screem. */
                MyErrorFunc("Failed to connect to Socket");
                close(Socket_Desc);
                return;
        }

Can anyone help??

PS I am just learning Palm programming and have not done any socket
programming either.

Thanks,

Jeff Barnes
[EMAIL PROTECTED]

Reply via email to