I've seen several people ask this question on the newsgroups without an
answer, perhaps you could help.
I have the following code:
Err err = FtrGet(inetLibFtrCreator,inetFtrNumVersion, &_value);
Handle inetH, sockH;
Word status;
Err error;
Boolean inputReady, outputReady;
Byte buffer[255];
DWord bytesIn;
if(err == 0)
{
err = SysLibFind("INet.lib",&libRefNum);
Word index;
err = INetLibConfigIndexFromName(libRefNum,(INetConfigNameType
*)inetCfgNameCTPWireless , &index);
err = INetLibOpen(libRefNum,index,0,NULL,0,&inetH);
err = INetLibCheckAntennaState(libRefNum);
Byte URL[255];
StrCopy((CharPtr)&URL,"http://www.dive-site.com/index.html");
err = INetLibURLOpen(libRefNum,inetH,URL,NULL,&sockH,-1,0);
err = INetLibSockRead(libRefNum,sockH,&buffer,50,&bytesIn,-1);
err = INetLibSockClose(libRefNum,sockH);
err = INetLibClose(libRefNum,inetH);
}
}
All indications are that up until the read everything is working great.
When I run a status check before the read, an 11 is returned indicating
network unreachable. When I remove the http:// from the URL, the open
command generates an error. My problem is that it's staying in the read
state forever waiting for the document, the document is received using
the PQA that I wrote from the same server so I know that the Palm has access
to it. Ideas?