Message16565
Logged In: YES
user_id=874382
I think this should solve the problem with non-default maps
in asyncore.dispatcher. Hope this helps.
*** asyncore.py Mon Sep 29 16:20:13 2003
--- asyncore-new.py Mon Sep 29 16:20:26 2003
***************
*** 201,206 ****
--- 201,211 ----
addr = None
def __init__(self, sock=None, map=None):
+ if (map is None):
+ self.map = socket_map
+ else:
+ self.map=map
+
if sock:
self.set_socket(sock, map)
# I think it should inherit this anyway
***************
*** 248,254 ****
self.socket = socket.socket(family, type)
self.socket.setblocking(0)
self._fileno = self.socket.fileno()
! self.add_channel()
def set_socket(self, sock, map=None):
self.socket = sock
--- 253,259 ----
self.socket = socket.socket(family, type)
self.socket.setblocking(0)
self._fileno = self.socket.fileno()
! self.add_channel(self.map)
def set_socket(self, sock, map=None):
self.socket = sock
***************
*** 353,359 ****
raise socket.error, why
def close(self):
! self.del_channel()
self.socket.close()
# cheap inheritance, used to pass all other attribute
--- 358,364 ----
raise socket.error, why
def close(self):
! self.del_channel(self.map)
self.socket.close()
# cheap inheritance, used to pass all other attribute
|
|
Date |
User |
Action |
Args |
2007-08-23 14:14:11 | admin | link | issue758241 messages |
2007-08-23 14:14:11 | admin | create | |
|