[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] Enable/disable write callback for UDP
- To: libevent-users@xxxxxxxxxxxxx
- Subject: [Libevent-users] Enable/disable write callback for UDP
- From: Jan Danielsson <jan.m.danielsson@xxxxxxxxx>
- Date: Sat, 20 Apr 2013 21:36:33 +0200
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Sat, 20 Apr 2013 15:36:44 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:organization:user-agent :mime-version:to:subject:x-enigmail-version:openpgp:content-type; bh=5HSE8OJM3WoHHNSLzftBWjx4ld3cOgEOr5Ea2xEiQbo=; b=xPaffL9tugJxJipfYqpnZdyUW1XczkIVvcGMDYoWw53Vf/L9g9fJeNaETbH1vbGjIj a345XOqsKjGSyMRsqXyoKOaY6FEq8xOhiXG9nLbuqwCngUE5WkzbXFeyBWLPHgfAidsA swqeolnPkHfoycX/RTHcNQ+BVa9OqSLJ4mS5t5cvNVZAmp8nrEounu/+xVX9an6O9x/c on/iH+LC08JS+emNW4juDST/scriBoRCZp627WnEH7K3qREwTTmaSUe1WHhujva9JLCl I6LBEb7XGm9V2gTxCzz3l7ksgEbL1ryQVOnTCpmkyWYk7AfbNpHyqvdAt8vuFU1J0bIB psPw==
- Openpgp: id=13D7A8ED
- Organization: La Cosa Nostra
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
- User-agent: Mozilla/5.0 (X11; NetBSD amd64; rv:17.0) Gecko/20130413 Thunderbird/17.0.5
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