Hi all,
I'm using NetLib and HTTP protocols to connect to my IIS server. The request is 
sent but i get a timeout error from NetLibDmReceive(). I don't know what is 
causing this error to happen. Even though i get a timeout error  there is a 
record inserted into my database but its all mumbo jumbo. I inserted 
NetLibSocketOptionSet() with netSocketOptSockNonBlocking just before 
NetLibSocketConnect but then it doesn't connect to the socket. Is this the 
correct place to put netSocketOptSockNonBlocking. Below is a sample of my 
code....

//send request
noOfBytes = NetLibSend(AppNetRefnum,
                                                        socket,
                                                        &Request,
                                                        bufLen,
                                                        0,
                                                        NULL,
                                                        0,
                                                        -1,
                                                        &error
                                                        );
                if(noOfBytes == -1)
                {
                        SetField(MainForm, NetworkField, StrCopy(buffer, "Not 
Sent"));
                        goto CloseSocket;
                }
                else
                {
                        SetField(MainForm, NetworkField, StrCopy(buffer, 
"Sent"));
                }

        //recieve data
        result = NetLibDmReceive(AppNetRefnum,
                                socket,
                                newRecP,
                                0,
                                1000,
                                0,
                                NULL,
                                NULL,
                                -1,
                                &error
                                );
        
                                
        if(error == 0)
        {                                                
                                                         
                if((newRecH = (MemHandle)DmQueryRecord(FYPDBOpen,0)))
                {
                        newRecP = (RecieveDataTypePtr)MemHandleLock(newRecH);
   
                        MemHandleUnlock(newRecH);
                }
        MemPtrUnlock(newRecP);
    }
    else
    {
        SetField(MainForm, NetworkField, StrCopy(buffer, (char*)error));
    }
-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to