示例#1
0
 def handler(pipe, args):
     return f(pipe, ffi.from_handle(args))
示例#2
0
 def on_timer_event(loop, item, arg):
     output_s = ffi.from_handle(arg)
     output_s.send('PING')
     return 0
示例#3
0
 def on_socket_event(loop, item, arg):
     # typically arg would be some class object containing state
     # information that would be used within this event handler.
     input_s = ffi.from_handle(arg)
     assert input_s.recv() == 'PING'
     return -1  # end the reactor
示例#4
0
文件: zloop.py 项目: aburan28/pyczmq
 def handler(loop, item, arg):
     return f(loop, item, ffi.from_handle(arg))
示例#5
0
文件: zloop.py 项目: aburan28/pyczmq
 def handler(loop, timer_id, arg):
     return f(loop, timer_id, ffi.from_handle(arg))
示例#6
0
文件: zloop.py 项目: minrk/pyczmq
 def handler(loop, item, arg):
     return f(loop, item, ffi.from_handle(arg))
示例#7
0
文件: zloop.py 项目: minrk/pyczmq
 def handler(loop, timer_id, arg):
     return f(loop, timer_id, ffi.from_handle(arg))
示例#8
0
 def handler(loop, reader, arg):
     return f(loop, reader, ffi.from_handle(arg))