From 39ab81351048b58f6ae8220737bc8b64912859ea Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Wed, 23 Jun 2010 08:40:29 +0000 Subject: [PATCH] add event_buffer_set_callback() description and update event_set() manual git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@300690 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../functions/event-buffer-set-callback.xml | 103 ++++++++++++++++++ reference/libevent/functions/event-set.xml | 18 ++- 2 files changed, 115 insertions(+), 6 deletions(-) create mode 100644 reference/libevent/functions/event-buffer-set-callback.xml diff --git a/reference/libevent/functions/event-buffer-set-callback.xml b/reference/libevent/functions/event-buffer-set-callback.xml new file mode 100644 index 0000000000..9e03915c02 --- /dev/null +++ b/reference/libevent/functions/event-buffer-set-callback.xml @@ -0,0 +1,103 @@ + + + + + event_buffer_set_callback + Set or reset callbacks for a buffered event + + + + &reftitle.description; + + resourceevent_buffer_set_callback + resourceevent + mixedreadcb + mixedwritecb + mixederrorcb + mixedarg + + + Sets or changess existing callbacks for the buffered event. + + + + + &reftitle.parameters; + + + + event + + + Valid buffered event resource. + + + + + readcb + + + Callback to invoke where there is data to read, or NULL if + no callback is desired. + + + + + writecb + + + Callback to invoke where the descriptor is ready for writing, + or NULL if no callback is desired. + + + + + errorcb + + + Callback to invoke where there is an error on the descriptor, cannot be + NULL. + + + + + arg + + + An argument that will be passed to each of the callbacks (optional). + + + + + + + + + &reftitle.returnvalues; + + event_buffer_set_callback returns &true; on success or &false; on failure. + + + + + + diff --git a/reference/libevent/functions/event-set.xml b/reference/libevent/functions/event-set.xml index 74c429da60..c328cced30 100644 --- a/reference/libevent/functions/event-set.xml +++ b/reference/libevent/functions/event-set.xml @@ -11,7 +11,7 @@ boolevent_set resourceevent - resourcefd + mixedfd intevents mixedcallback mixedarg @@ -21,9 +21,14 @@ is prepared to call the function specified by the callback on the events specified in parameter events, which is a set of the following flags: EV_TIMEOUT, - EV_SIGNAL, EV_READ and - EV_WRITE. + EV_SIGNAL, EV_READ, + EV_WRITE, EV_PERSIST and + EV_SIGNAL. + + If EV_SIGNAL bit is set in parameter events, + the fd is interpreted as signal number. + After initializing the event, use event_base_set to associate the event with its event base. @@ -36,7 +41,7 @@ fd - Resource indicating the stream. + Signal number or resource indicating the stream. @@ -44,9 +49,10 @@ events - A flag indicating the event. Can be one of the following: + A flag indicating the event. Consists of the following flags: EV_TIMEOUT, EV_SIGNAL, - EV_READ or EV_WRITE. + EV_READ, EV_WRITE, + EV_PERSIST and EV_SIGNAL.