示例#1
0
 def __init__(self, udp):
     Handle.__init__(self, rffi.cast(uv.handle_ptr, udp))
     self.udp = udp
     self.alloc_buffers = []
     self.read_buffer_size = 0
     self.read_queue = []
     self.read_greenlet = None
示例#2
0
    def __init__(self, stream):
        Handle.__init__(self, rffi.cast(uv.handle_ptr, stream))
        self.stream = stream
        self.listening = False
        self.listen_count = 0
        self.listen_status = 0
        self.accept_greenlet = None

        self.alloc_buffers = []
        self.read_buffer_size = 0
        self.read_queue = []
        self.read_greenlet = None
示例#3
0
 def getattr(self, name):
     if name == u"readable":
         return boolean(uv.is_readable(self.stream))
     if name == u"writable":
         return boolean(uv.is_writable(self.stream))
     return Handle.getattr(self, name)
示例#4
0
 def __init__(self, fs_event):
     Handle.__init__(self, rffi.cast(uv.handle_ptr, fs_event))
     self.fs_event = fs_event
     self.data = []
     self.status = 0
     self.greenlet = None