Hi!
Is there a way to access a specific connected socket when using a derived
asyncore.dispat cher and derived asynchat.async_ chat?
class AcmeServer(asyn core.dispatcher ):
def __init__(self, port):
self.create_soc ket(socket.AF_I NET, socket.SOCK_STR EAM)
self.bind(("", port))
self.listen(5)
def handle_accept(s elf):
conn, addr = self.accept()
AcmeChannel(sel f, conn, addr)
def handle_close(se lf):
print 'Server closed'
def handle_error(se lf):
print 'Server error'
How do I access the underlying list/map/array of AcmeChannel?
Thank you.
Is there a way to access a specific connected socket when using a derived
asyncore.dispat cher and derived asynchat.async_ chat?
class AcmeServer(asyn core.dispatcher ):
def __init__(self, port):
self.create_soc ket(socket.AF_I NET, socket.SOCK_STR EAM)
self.bind(("", port))
self.listen(5)
def handle_accept(s elf):
conn, addr = self.accept()
AcmeChannel(sel f, conn, addr)
def handle_close(se lf):
print 'Server closed'
def handle_error(se lf):
print 'Server error'
How do I access the underlying list/map/array of AcmeChannel?
Thank you.
Comment