sockets: client dies...

Keith Murphy kpmurphy at my-deja.com
Tue Jan 30 10:31:08 EST 2001


my major problem is that this is all fine and dandy, with one client and
one server... but what happens when you have multiple clients on a
single server?  you get hung up waiting for responses from each client.
i guess you could spawn a new thread for each client... is there a
better way to do this?

::keith

In article <94uibd$t8c$1 at saltmine.radix.net>,
  cobrien at Radix.Net (Cary O'Brien) wrote:
> In article <94pn5h$t3e$1 at nntp6.u.washington.edu>,
> Donn Cave  <donn at u.washington.edu> wrote:
> >Quoth Keith Murphy <kpmurphy at my-deja.com>:
> >| ok here's what i understand.
>
> [snip discussion of socket programming approaches]
>
> >
> >To reiterate:  When the client dies, the connection will close.
> >When the connection has closed, recv() will return an empty string,
> >length == 0.
> >
>
> Depends on what you mean by dies.  If the process at the other end
> terminates and the operating system thereunder operates correctly,
> you're right, the TCP session will close and recv() will return
> an empty string.
>
> But if you're talking to a PC, and they just shut it off, or the DSL
> line goes down or someone picks up the phone on the modem line or
> something your end won't know that for a *LONG* time.  So your recv()
> may hang.
>
> Just thought I'd bring that up.
>
> [snip ditto]
>
> reliving-painfull-episodes-of-past-jobs-ly yours
>
>


Sent via Deja.com
http://www.deja.com/



More information about the Python-list mailing list