[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[Libevent-users] Enable/disable write callback for UDP



Hello,

   I'm doing this (roughly):

   ---------------
   udp_sock = create_udo4_any_socket("7777");
   evutil_make_socket_nonblocking(udp_sock);
   udp_event = event_new(base, udp_sock, EV_READ|EV_WRITE|EV_PERSIST,
      proc_udp_packet, (void*)base);
   event_add(udp_event, NULL);
   ---------------

   But I want to disable, and later re-enable, EV_WRITE in the callback
function (well, in other functions as well, but I'm guessing the method
would be the same regardless). How is this done?

-- 
Kind regards,
Jan Danielsson


Attachment: signature.asc
Description: OpenPGP digital signature