Do a search on this forum for LINGER. It is most likely your problem.
--------------------------------------------------------------------
Gary Gorsline
Easy Business Software
========================== End of Message ==========================
----- Original Message -----
From: "ana erdozain" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Tuesday, May 28, 2002 7:36 AM
Subject: Net lib socket.
> Hi!
> In my application I am trying to establish a TCP/IP
> connection.
> I don't know, what i am doing false, because my TCP/IP
> connection is only valid the first connection, in the
> next connections i can't connect.
>
> Now I am doing that:
> in AppStart:
> SysLibFind("Net.lib", &AppNetRefnum);
> // Set our default Timeout
> AppNetTimeout = 10*sysTicksPerSecond;
> NetLibOpen(AppNetRefnum,&neterror);
> than
> open socket;
> if no errors:
> connect;
> if no errors:
> send request;
> send(socketfd, outbuff2, outbytes2, 0)
> receive data from server.
> recvfrom(socketfd, inbuff,StrLen(inbuff),
> 0,(struct sockaddr *) 0, (int *) 0);
> shutdown socket;
> close socket;
> in AppStop:
> NetLibClose;
>
> I'm not sure, which is the diference between Shutdown
> the socket and close it.
> Thanks in advance
> Regards
> Ana
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/