On Fri, Apr 28, 2000 at 02:21:48PM -0600, Steve Achelis wrote:
> I've developed a Palm app using CW. I successfully call INetLibOpen() and
> INetLibURLOpen(), but when I call INetLibSockRead() it immediately fails
> with 4630.
netErrWrongSocketType
> This was working for me, but now it generates this message (I'm not sure
> what changed, my ISP, the version of emulator, etc.).
>
> This happens in the emulator. The code is designed to read a file from the
> web (not web clipping).
>
> Any ideas? Does anyone know how I can find out what err 4620 means? It
> isn't one of the inetErr... defines from INetMgr.h.
netErrNoInterfaces (is netlib emulation turned on in poser?)
-----------------
The number is a decimal number which you can look up in the 3.4
headers (in this case System/NetMgr.h).
Here is a code fragment from a similar app I wrote:
err = SysLibFind("INet.lib", &INRef);
INetLibConfigIndexFromName(INRef, inetCfgNameCTPDefault, &CfIn);
err = INetLibOpen(INRef, CfIn, 0, 0, 0, &inh);
set = 64000;
err |= INetLibSettingSet(INRef, inh, inetSettingMaxRspSize, &set, 4);
set = ctpConvNone;
err |= INetLibSettingSet(INRef, inh, inetSettingConvAlgorithm, &set, 4);
err |= INetLibURLOpen(INRef, inh, host, NULL, &sock, 2000, 0);
My next call is the sock read (after verifying err).
POSEr needs the network emulation turned on, but then the open call
will ALWAYS succeed. I think the URLOpen will not send or receive any
packets until the SockRead function is called.
If your URL is invalid in any way you can get errors too.
Also, if the Proxy server is down (slow, or has other problems) you
can get these errors (running a packet sniffer or a PPP that has this
kind of function helps since you can see the request and response).
You will note I set things so I can receive large files and get them
without proxy compression (bad things happen to binary data if you
don't). If your server is saying other than text/plain or text/html
it can also cause problems.
Since I don't know what you are doing ("Why did X stop working with
error Y" doesn't really help me diagnose things") I can't be more
specific.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html