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