"Tim Roberts" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> John Salerno <[EMAIL PROTECTED]> wrote:
>>
>>I'm now experimenting with the SocketServer class. Originally I
>>subclassed the StreamRequestHandler to make my own custom handler, but a
>>result of this seems to be that the client socket closes after it has
>>been used, instead of staying open.
>
> Right.  "handle" is not called for one REQUEST at a time, it's called for
> one CONNECTION at a time.  If you need a connection to be persistent, then
> your handle() function needs to sit in a loop making recv calls until you
> detect that the conversation is complete.

Ah, so I need to rewrite my handle method. I was thinking that the 
specialized setup() and/or finish() calls from StreamRequestHandler were the 
reason that the connection was closed after one use (which is why I tried 
BaseRequestHandler instead).

Thanks. 


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to