Exemple #1
0
 def __init__(self, iom, fd):
     ioman_base.chan.__init__(self, iom)
     self.events = 0
     self.read_sz = 1000
     self.fd = fd
     portability.set_blocking_fd(fd, 0)
     portability.set_close_on_exec_fd(fd, 1)
     self.want_read = 0
     self.request_read()
     if dbg>=3: 
         LOG("%s fd = %d\n" % (self.__class__.__name__, fd))
Exemple #2
0
 def __init__(self, iom, fd):
     ioman_base.chan.__init__(self, iom)
     self.events = 0
     self.fd = fd
     portability.set_blocking_fd(fd, 0)
     portability.set_close_on_exec_fd(fd, 1)
     # list of not-yet-completed write requests
     self.requests = []
     self.pending_writes = 0
     self.pending_close = 0
     if dbg>=3: 
         LOG("%s fd = %d\n" % (self.__class__.__name__, fd))