Name
handle_accept
Synopsis
d
.handle_accept( )
Called when a new client has connected.
Your class X
normally responds by calling
self.accept
, then instantiating another subclass
Y
of dispatcher
with
the resulting new socket, in order to handle the new client
connection.
Your implementation of handle_accept
need not
return the resulting instance of Y
: all
instances of subclasses of dispatcher
register
themselves with the asyncore
framework in method
dispatcher.__init__
, so that
asyncore
calls back to their methods as
appropriate.
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.