I am hoping someone else has seen this:
I am opening a socket to a webserver and send a GET request eg.
char* request = "GET /cgi-bin/palm.pl?s0=xyz&s1=xyz HTTP/1.0 \r\n\r\n";
int len = strlen(request);
if(send(socketfd,request,len,0) == -1) ... read response
When my request string is 91 bytes or less, things works fine,
but when it's 92 bytes long, then there is one successful download but
all subsequent attempts fail in the connect method.
The connect 'errno' is 4612. I looked in file sys_errno.h, but
all error codes are in the range up to 100, so I am probably doing
something wrong there.
Fyi, the same code works from my linux box. I am using standard Unix
socket functions rather than Palm's netlib.
Has anyone seen something like that or has some idea what I could be
doing wrong ?
thanks
here my connect method:
Boolean Loader::Connect()
{
// get a socket
if((socketfd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
debugp->Print("ERR: socket() ");
return false;
}
// connect
int err = connect(socketfd,(struct sockaddr*)&serveraddr,sizeof(struct
sockaddr));
if(err == -1) {
StrPrintF(debuffer,"ERR:connect() = %d : %d",err,errno);
debugp->Print(debuffer);
return false;
}
else {
debugp->Print("OK:connected");
return true;
}
}
__________________________________________________
FREE voicemail, email, and fax...all in one place.
Sign Up Now! http://www.onebox.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/