Example #1
0
 def handler(pipe, args):
     return f(pipe, ffi.from_handle(args))
Example #2
0
 def on_timer_event(loop, item, arg):
     output_s = ffi.from_handle(arg)
     output_s.send('PING')
     return 0
Example #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
Example #4
0
 def handler(loop, item, arg):
     return f(loop, item, ffi.from_handle(arg))
Example #5
0
 def handler(loop, timer_id, arg):
     return f(loop, timer_id, ffi.from_handle(arg))
Example #6
0
 def handler(loop, item, arg):
     return f(loop, item, ffi.from_handle(arg))
Example #7
0
 def handler(loop, timer_id, arg):
     return f(loop, timer_id, ffi.from_handle(arg))
Example #8
0
 def handler(loop, reader, arg):
     return f(loop, reader, ffi.from_handle(arg))