Rus & Peter,

Our server model uses multiple threads.  We have the initial process
listening for clients. Once a clients attempts a connection the server
accepts, creates a thread, passes the socket to the thread. This has been
stress tested with as many as 100 test clients on win2k. The problem is on
the palm side. We have a sequence when the palm logs in and retrieves like
500 bytes of data. If one symbol connects and logs on it can continually
talk with the server. Once the second unit logs on, this will happen
sucessfully if the first unit is not transmitting or receiving, it can log
on fine. But it kicks off the first unit. The first unit will try to connect
and the server acknowledges the attemp but it always receives an error
stating that the previous virtual circuit end abruptly. I can then exit the
program on the symbol and start the application again and it will pick up
were it left off but then it will kick out the second unit.

In our program every time we open the library on appstart and close it on
appstop. Every time a symbol needs to send or receive I make a new
connection to the server send receive then close it. I would like to stay
away from opening and closing the library, but if that our only choice than
so be it. Also I setup the option to have the socket linger for 10 seconds
after the connection is closed but i had the same reaction without setting
up that option.

Thanks,

Carlos

----- Original Message -----
From: Nesse, Rustin <[EMAIL PROTECTED]>
To: Palm Developer Forum <[EMAIL PROTECTED]>
Sent: Thursday, August 10, 2000 7:10 PM
Subject: RE: Multiple TCP connects


> You could set your timeouts on the NetLibSocketClose and
> NetLibSocketConnect to something like 50 or 60 or something...
> Do you do a NetLibSocketListen before your other units connect?
> You could also do a complete shutdown with NetLibSocketShutdown.
> Some way, that unit needs to disconnect if another 1740 is to get
> access to the server.  Perhaps you could rework your recieves to
> have a timeout?  If the 1740 doesn't get a packet before the
> timeout is met, you could close the socket and listen for a new
> connection.
>
> Hope that helps!
>
> -Rus
>
> >-----Original Message-----
> >From: DCU [mailto:[EMAIL PROTECTED]]
> >Sent: Thursday, August 10, 2000 1:49 PM
> >To: Palm Developer Forum
> >Subject: Re: Multiple TCP connects
> >
> >
> >Rus,
> >
> >Thank you for your response. The error on the server side is
> >"the previous
> >socket closed abruptly".  To disconnect I am using the following code:
> >
> >=================================================================
> > short SocketCloseErr;
> > int  error;
> >
> > error = NetLibSocketClose
> >(NetLibOpenRef,theSocket,-1,&SocketCloseErr);
> > if(error != 0)
> > {
> >  return SocketCloseErr;
> > }
> >
> > theSocket = NULL;
> > return 0;
> >=================================================================
> >Thanks,
> >
> >Carlos
>
> --
> 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