You will need to see what return code is.  If -1, then err will have the
error code.  I bet it is "parm error".  On POSE debug roms it appears that
you need to use a NULL for both fromaddrP and fromlenP parameters.  But I'm
just guessing.  Very little discussion is in the threads, as I have had the
same problem and found some references to using NULL or numeric zero as
these parameters and my problems have disappeared.  See thread on 7/18/2001
an FtrGet () proposal where I again asked the NULL question and Keith
responded.  A Palm, Inc. engineer has suggested that Keith knows what he is
talking about on this subject.  It works for me in ALL environments tried.

But it also could be that you are specifying a -1 for the timeout.  try
setting this value to the number of system ticks per second times say 10 or
15 seconds.  Our timeout may really be 65535 system ticks or a heck of a
long time, e.g., it is a Uint16, not Int16 parm.  It's late and I don't have
time to look it up, sorry.

Maybe Keith can again clarify.
--------------------------------------------------------------------
Gary Gorsline
Easy Business Software
========================== End of Message ==========================

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Monday, July 23, 2001 11:04 PM
Subject: How to use the NetLibReceive?


> Hi All,
>
> What is the correct way to use the NetLibReceive Function?
>
> I found I cannot receive anything from the server.
> But I can sucessfully connect and sending data to the server.
>
> Is this the correct way?
>
> char buffer[200]="";
>
> ....
>
> NetLibReceive(refno,socket,buff,200,0,(NetSocketAddrType*)&add_in,
> &addrlen,-1,&err);
>
>
> Do I need to use any MemHandleLock..or other functions?
>
> I found the whole application will hold at this functions!
>
> Thanks!
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to