From 14d80970bffb5d8d29c050e06027ba6fa390061f Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Thu, 2 Jan 2014 18:19:28 -0500 Subject: [PATCH] uv.a is now called libuv.a --- .travis.yml | 2 +- README.md | 264 ++++++++++++++++++++++++++-------------------------- config.m4 | 4 +- 3 files changed, 133 insertions(+), 137 deletions(-) diff --git a/.travis.yml b/.travis.yml index 69e0e3e..3118cbb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ php: - 5.5 before_script: - - cd libuv && make uv.a CFLAGS=-fPIC -s && cd .. + - cd libuv && make libuv.a CFLAGS=-fPIC -s && cd .. - phpize && ./configure && make && sudo make install - echo "extension=uv.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"` diff --git a/README.md b/README.md index ffb6517..3fe0876 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ interface to libuv for php (experimental). also supports http-parser. # Experimental -This extension is experimental, its functions may change their names +This extension is experimental, its functions may change their names or move to extension all together so do not rely to much on them you have been warned! # Install @@ -15,7 +15,7 @@ or move to extension all together so do not rely to much on them you have been w git clone https://github.com/chobie/php-uv.git --recursive cd php-uv (cd libuv && make) -# Note: please use `make uv.a CFLAGS=-fPIC` instead of `make` on 64bit box. +# Note: please use `make libuv.a CFLAGS=-fPIC` instead of `make` on 64bit box. phpize ./configure make @@ -104,7 +104,7 @@ get last error code. ##### *Parameters* -*resource $uv_loop*: uv loop handle +*resource $uv_loop*: uv loop handle ##### *Return Value* @@ -181,7 +181,7 @@ increment reference count ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -209,7 +209,7 @@ run event loop ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -243,7 +243,7 @@ delete specified loop resource. ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -266,7 +266,7 @@ binds a name to a socket. ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -305,7 +305,7 @@ binds a name to a socket. ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -343,7 +343,7 @@ send buffer to speicified uv resource. ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -366,7 +366,7 @@ set Nagel's flags for specified tcp resource. ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -391,7 +391,7 @@ accepts a connection on a socket. ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -429,7 +429,7 @@ shutdown uv handle. ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -448,7 +448,7 @@ close uv handle. ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -468,7 +468,7 @@ starts read callback for uv resources. ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -494,7 +494,7 @@ stop read callback ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -635,7 +635,7 @@ connect to specified ip address and port. ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -664,7 +664,7 @@ connect to specified ip address and port. ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -717,7 +717,7 @@ initialize timer handle. ##### *Return Value* -*void: +*void: ##### *Example* @@ -794,7 +794,7 @@ set repeat count. ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -812,7 +812,7 @@ returns repeat interval. ##### *Return Value* -*long $repeat_time*: +*long $repeat_time*: ##### *Example* @@ -1037,7 +1037,7 @@ uv_udp_bind($udp, uv_ip4_addr('0.0.0.0',10000)); uv_udp_recv_start($udp,function($stream, $nread, $buffer){ echo "recv:" . $buffer; - + uv_close($stream); }); @@ -1081,7 +1081,7 @@ uv_udp_bind6($udp, uv_ip6_addr('::1',10000)); uv_udp_recv_start($udp,function($stream, $nread, $buffer){ echo "recv:" . $buffer; - + uv_close($stream); }); @@ -1123,7 +1123,7 @@ uv_udp_bind6($udp, uv_ip6_addr('::1',10000)); uv_udp_recv_start($udp,function($stream, $nread, $buffer){ echo "recv:" . $buffer; - + uv_close($stream); }); @@ -1188,11 +1188,11 @@ set multicast loop *resource $handle*: uv resource handle (udp) -*long $enabled*: +*long $enabled*: ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -1212,7 +1212,7 @@ set multicast ttl ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -1228,11 +1228,11 @@ set udp broadcast *resource $handle*: uv resource handle (udp) -*long $enabled*: +*long $enabled*: ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -1269,7 +1269,7 @@ uv_udp_bind($udp, uv_ip4_addr('::1',10000)); uv_udp_recv_start($udp,function($stream, $nread, $buffer){ echo "recv:" . $buffer; - + uv_close($stream); }); @@ -1314,7 +1314,7 @@ uv_udp_bind6($udp, uv_ip6_addr('::1',10000)); uv_udp_recv_start($udp,function($stream, $nread, $buffer){ echo "recv:" . $buffer; - + uv_close($stream); }); @@ -1390,7 +1390,7 @@ initialize pipe resource ##### *Return Value* -*resource $uv_pipe*: +*resource $uv_pipe*: ##### *Example* @@ -1415,7 +1415,7 @@ open a pipe resource. ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -1435,7 +1435,7 @@ create a named pipe. ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -1457,7 +1457,7 @@ connect to named pipe. ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -1494,7 +1494,7 @@ retunrs current loadaverage. ##### *Return Value* -*array $loadaverage*: +*array $loadaverage*: ##### *Example* @@ -1527,7 +1527,7 @@ returns current uptime. ##### *Return Value* -*long $uptime*: +*long $uptime*: ##### *Example* @@ -1549,7 +1549,7 @@ returns current free memory size. ##### *Return Value* -*long $free*: +*long $free*: ##### *Example* @@ -1571,7 +1571,7 @@ returns total memory size. ##### *Return Value* -*long $free*: +*long $free*: ##### *Example* @@ -1601,7 +1601,7 @@ returns current exepath. basically this will returns current php path. ##### *Return Value* -*string $exepath*: +*string $exepath*: ##### *Example* @@ -1623,7 +1623,7 @@ returns current working directory. ##### *Return Value* -*string $cwd*: +*string $cwd*: ##### *Example* @@ -1647,7 +1647,7 @@ returns current cpu informations ##### *Return Value* -*array $cpu_info*: +*array $cpu_info*: ##### *Example* @@ -1696,11 +1696,11 @@ send signal to specified uv process resource. *resource $handle*: uv resource handle (process) -*long $signal*: +*long $signal*: ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -1720,7 +1720,7 @@ send signal to specified pid. ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -1738,7 +1738,7 @@ change working directory. ##### *Return Value* -*bool *: +*bool *: ##### *Example* @@ -1772,7 +1772,7 @@ set read lock ##### *Return Value* -*void *: +*void *: ##### *Example* @@ -1798,7 +1798,7 @@ unlock read lock ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -1816,7 +1816,7 @@ set write lock ##### *Return Value* -*void *: +*void *: ##### *Example* @@ -1842,7 +1842,7 @@ unlock write lock ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -1876,7 +1876,7 @@ lock mutex ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -1900,7 +1900,7 @@ initialize semaphore resource ##### *Return Value* -*resource $uv_sem*: +*resource $uv_sem*: ##### *Example* @@ -1918,7 +1918,7 @@ post semaphore ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -2060,7 +2060,7 @@ $i = 0; uv_idle_start($idle, function($stat) use (&$i, $idle, $loop){ echo "count: {$i}" . PHP_EOL; $i++; - + if ($i > 3) { uv_idle_stop($idle); } @@ -2102,7 +2102,7 @@ setup async callback *resource $loop*: uv loop resource -*callback $callback*: +*callback $callback*: ##### *Return Value* @@ -2124,7 +2124,7 @@ send async callback immidiately ##### *Return Value* -*void*: +*void*: ##### *Example* @@ -2154,13 +2154,13 @@ open specified file ##### *Return Value* -*void*: +*void*: ##### *Example* ````php