Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

event_add(3) [php man page]

EVENT_ADD(3)								 1							      EVENT_ADD(3)

event_add - Add an event to the set of monitored events

SYNOPSIS
bool event_add (resource $event, [int $timeout = -1]) DESCRIPTION
event_add(3) schedules the execution of the $event when the event specified in event_set(3) occurs or in at least the time specified by the $timeout argument. If $timeout was not specified, not timeout is set. The $event must be already initalized by event_set(3) and event_base_set(3) functions. If the $event already has a timeout set, it is replaced by the new one. PARAMETERS
o $event - Valid event resource. o $timeout - Optional timeout (in microseconds). RETURN VALUES
event_add(3) returns TRUE on success or FALSE on error. PHP Documentation Group EVENT_ADD(3)

Check Out this Related Man Page

EIO_GET_EVENT_STREAM(3) 						 1						   EIO_GET_EVENT_STREAM(3)

eio_get_event_stream - Get stream representing a variable used in internal communications with libeio.

SYNOPSIS
mixed eio_get_event_stream (void ) DESCRIPTION
eio_get_event_stream(3) acquires stream representing a variable used in internal communications with libeio. Could be used to bind with some event loop provided by other PECL extension, for example libevent. PARAMETERS
This function has no parameters. RETURN VALUES
eio_get_event_stream(3) returns stream on success; otherwise, NULL EXAMPLES
Example #1 Using eio with libevent <?php function my_eio_poll($fd, $events, $arg) { /* Some libevent regulation might go here .. */ if (eio_nreqs()) { eio_poll(); } /* .. and here */ } function my_res_cb($d, $r) { var_dump($r); var_dump($d); } $base = event_base_new(); $event = event_new(); $fd = eio_get_event_stream(); var_dump($fd); eio_nop(EIO_PRI_DEFAULT, "my_res_cb", "nop data"); eio_mkdir("/tmp/abc-eio-temp", 0750, EIO_PRI_DEFAULT, "my_res_cb", "mkdir data"); /* some other eio_* calls here ... */ // set event flags event_set($event, $fd, EV_READ /*| EV_PERSIST*/, "my_eio_poll", array($event, $base)); // set event base event_base_set($event, $base); // enable event event_add($event); // start event loop event_base_loop($base); /* The same will be available via buffered libevent interface */ ?> The above example will output something similar to: int(3) int(0) string(8) "nop data" int(0) string(10) "mkdir data" PHP Documentation Group EIO_GET_EVENT_STREAM(3)
Man Page

9 More Discussions You Might Find Interesting

1. Solaris

Process wait time

Hi all, I am trying to find out the process wait time on Unix(AIX/SOLARIS) machine( only sh/ksh/csh): Like EXAMPLE 1 : $ vmstat 2 System configuration: lcpu=16 mem=32000MB kthr memory page faults cpu ----- -----------... (1 Reply)
Discussion started by: chandrakala.sg
1 Replies

2. AIX

Waiting time of Process

Hi all, I am trying to find out the process wait time on Unix(AIX/SOLARIS) machine( only sh/ksh/csh): Like EXAMPLE 1 : $ vmstat 2 System configuration: lcpu=16 mem=32000MB kthr memory page faults cpu ----- -----------... (4 Replies)
Discussion started by: chandrakala.sg
4 Replies

3. Programming

epoll problem with tcp connect()

I am using epoll to manage my network connections. At the client side, the idea is to send the message upon detecting the completion of connect(). I've set up the socket to be nonblocking, then after calling of connect(), I add the socket into the epoll and wait on the event to be detected from... (0 Replies)
Discussion started by: tuesday420
0 Replies

4. UNIX for Dummies Questions & Answers

shell scripting question

Testing for the presence/absence of a pattern in a file, using /bin/sh: while read a; do b="${a##*pattern*}"; ; done < file This returns 0 if there's a match. That signal ($?) can then be used outside the loop. However this method reads through the whole file, even if the match... (2 Replies)
Discussion started by: uiop44
2 Replies

5. UNIX for Dummies Questions & Answers

SSH Keys Authentication keeps asking for password

Hi! Im trying to set access from ServerA(SunOS) to ServerB(Some custom Linux with Keyboard Interactive login) with SSH Keys. As a proof of concept I was able to do it between 2 virtual machines. Now in my real life scenario it isnt working. I created the keys in ServerA, copied them to... (7 Replies)
Discussion started by: RedSpyder
7 Replies

6. Post Here to Contact Site Administrators and Moderators

Event Prediction - Euro 2012

Please add this new "event". (10 Replies)
Discussion started by: ni2
10 Replies

7. Shell Programming and Scripting

Editing HTML with FTP access

Hello, I've got a similar problem. I want to add some lines before the ending of the <head> tags. How can I do that? Example.<head> <some website stuff here> <My stuff> <head> I'd like to do that automatically with ftp. Is it possible to activate a sort of syncing in order to update... (4 Replies)
Discussion started by: danogentili
4 Replies

8. UNIX for Dummies Questions & Answers

Add event

Hi all, Need to solve this problem file1.txt 0912804166|RR 0912804171|YY file2.txt 0912804175|AXE|510100475741082 0912804166|NODE|0 I need to add event on file1.txt if column 1 in file1.txt is also found in file2.txt, the event is 1, but in contrary if column 1 in file1.txt is not... (3 Replies)
Discussion started by: radius
3 Replies

9. OS X (Apple)

Mac OS X LDAP client not accepting ssh or console logins (PAM error)

Hi Folks, I've install 389 Directory Server on a Centos 7.0 server. Over the last two days I've been trying to connect a MacBook running 10.10.5 to the server as a client and I'm having only partial success. I've "Joined" to my network Account Server, and set my LDAP Mappings to... (2 Replies)
Discussion started by: jlh
2 Replies