Commit Graph

95 Commits

Author SHA1 Message Date
Bob Weinand
4751e80a65 Fix various bugs... 2015-01-18 17:24:13 +01:00
Bob Weinand
4332fe7aa1 Current, broken PHP 7 port... 2015-01-18 02:58:40 +01:00
Tjerk Meesters
bdaf5a0bb8 Enabled http parser again 2014-08-21 08:31:25 +08:00
Tjerk Meesters
90f12cb77f Moving parser functionality in a separate file (part 1) 2014-08-20 18:44:55 +08:00
Daniel Lowrey
148a84f62b Add UV::S_IFDIR + UV::S_IFREG constants
These constants allow differentiation between regular files (S_IFREG)
and directories (S_IFDIR) when used for bitwise AND operations against
the "mode" value returned from uv_fs_stat/fstat/lstat().

Example:

    uv_fs_open(uv_default_loop(), __FILE__, UV::O_RDONLY, 0, function($r){
        uv_fs_fstat(uv_default_loop(), $r, function($result, $da){
            echo "is directory: ", ($da['mode'] & UV::S_IFDIR ? 'yes' : 'no'), "\n";
            echo "if file: ", ($da['mode'] & UV::S_IFREG ? 'yes' : 'no'), "\n";
        });
    });
    uv_run();
2014-06-18 10:04:05 -04:00
Daniel Lowrey
cf36261e3e Fix accidental chmod changes 2014-06-11 19:09:32 -04:00
Daniel Lowrey
1e32c24608 Add signal handling support
- resource uv_signal_init([resource $loop])
- void uv_signal_start(resource $sigHandle, callable $onSignal, int $signal)
- void uv_signal_stop($signalResource)

Example:

    <?php
    $sigHandle = uv_signal_init();
    $onSigint = function($sigHandle, $sigNum) {
        printf("Caught signal: %d\n", $sigNum);
        uv_signal_stop($sigHandle);
        uv_stop();
    };
    uv_signal_start($sigHandle, $onSigint, UV::SIGINT);
    uv_run();

New signal constants (these vary by OS):

    <?php
    $refl = new ReflectionClass('UV');
    print_r($refl->getConstants());
2014-06-10 10:56:32 -04:00
Shuhei Tanuma
951622a3aa improve http parser:
* support multiple line header field and value.
* support http upgrade mechanism (you have to parse websocket protocol manually)
2014-02-25 17:17:34 +09:00
Shuhei Tanuma
7d210d8033 check thread feature 2014-01-04 02:37:26 +09:00
brettlangdon
9e0935aa91 bump version to 0.0.2 2014-01-02 18:23:30 -05:00
Shuhei Tanuma
9ab5074c77 add 5.2 support 2013-09-09 15:59:20 +09:00
Shuhei Tanuma
90c9db6905 update latest libuv and http-parser
Notes: ares functions are removed as uv removed that features. please use before commit
if you want to use ares features. currently, php ares extension seems not maintained.
please ask me when you met some troubles about ares feature.
2013-02-11 22:09:29 +09:00
Shuhei Tanuma
a62a234d49 win32: remove needless ifndef block 2012-09-26 02:59:31 +09:00
Shuhei Tanuma
0a2b0751c1 spawn: change function signature. add uv_stdio_new function 2012-07-22 21:54:19 +09:00
Shuhei Tanuma
cb40015ffd for now, move declarations 2012-07-21 20:54:45 +09:00
Shuhei Tanuma
4679654de7 uv_lock functions: use common function 2012-07-21 20:49:10 +09:00
Shuhei Tanuma
0ad997171b uv_udp: check resource type 2012-07-21 15:53:44 +09:00
Shuhei Tanuma
0a0547fb37 remove needless semicoron 2012-07-16 10:49:12 +09:00
Shuhei Tanuma
61a05cbc96 uv_fs*: callback parameter fd passes given PHPs stream, socket or file descriptor. 2012-07-15 23:47:49 +09:00
Shuhei Tanuma
9c28657090 i don't have good solution for including php_sockets.h on windows box. for now comment out 2012-07-15 14:03:22 +09:00
Shuhei Tanuma
141de07e0e now, uv_fs functions accepts php's stream, socket and fd 2012-07-15 03:56:29 +09:00
Shuhei Tanuma
20ab459846 adjust dtrace support 2012-07-14 22:57:18 +09:00
Shuhei Tanuma
0c48f290a1 use fci and fcc for getaddr cb 2012-07-12 00:47:24 +09:00
Shuhei Tanuma
98ff7e121b use fci and fcc for read2 cb 2012-07-12 00:45:20 +09:00
Shuhei Tanuma
15fd7624d5 use fci and fcc for pol cb 2012-07-12 00:43:22 +09:00
Shuhei Tanuma
0cbdc2f42e use fci and fcc for fs poll cb 2012-07-12 00:40:33 +09:00
Shuhei Tanuma
d424bc25f1 use fci and fcc for fs event cb 2012-07-12 00:36:33 +09:00
Shuhei Tanuma
759849c6a2 use fci and fcc for fs cb 2012-07-12 00:34:41 +09:00
Shuhei Tanuma
92ce41343d use fci and fcc for queue callbacks 2012-07-12 00:20:09 +09:00
Shuhei Tanuma
79103b8e12 use fci and fcc for pipe_connect_cb 2012-07-12 00:14:53 +09:00
Shuhei Tanuma
6ffc7a34b7 use fci and fcc for proc_close_cb 2012-07-12 00:11:53 +09:00
Shuhei Tanuma
04023a572f use fci and fcc for async_cb 2012-07-11 22:49:03 +09:00
Shuhei Tanuma
f81ae681e8 use fci and fcc for check_cb 2012-07-11 22:27:57 +09:00
Shuhei Tanuma
907f6f1882 use fci and fcc for prepare_cb 2012-07-11 22:24:05 +09:00
Shuhei Tanuma
a5e2ddd48d use fci and fcc for send_cb 2012-07-11 22:21:46 +09:00
Shuhei Tanuma
8a5bd17944 use fci and fcc for idle_cb 2012-07-11 22:17:18 +09:00
Shuhei Tanuma
4fc3f9f879 use fci and fcc for timer_cb 2012-07-11 22:15:33 +09:00
Shuhei Tanuma
55921716ed use fci and fcc for close_cb 2012-07-11 22:13:47 +09:00
Shuhei Tanuma
aa0ad16b0f use fci and fcc for shutdown_cb 2012-07-11 22:01:00 +09:00
Shuhei Tanuma
2c3954f56c use fci and fcc for write_cb 2012-07-11 21:58:16 +09:00
Shuhei Tanuma
8589280609 use fci and fcc for listen_cb 2012-07-11 21:57:24 +09:00
Shuhei Tanuma
675d794060 use fci and fcc for read_cb 2012-07-11 21:52:44 +09:00
Shuhei Tanuma
899ccf4b56 remove unused connect_cb zval 2012-07-11 13:09:19 +09:00
Shuhei Tanuma
cd35fa861b don't use magic number 2012-07-11 13:07:57 +09:00
Shuhei Tanuma
e1904a6d25 - use fci and fcc instead of zval. 2012-07-11 13:07:08 +09:00
Shuhei Tanuma
9e603ef603 add poll api 2012-07-09 12:24:35 +09:00
Shuhei Tanuma
8f262a3f70 add fs_poll_start/stop functions 2012-07-09 01:27:02 +09:00
Shuhei Tanuma
b9d5715635 add uv_sem_init 2012-07-09 00:18:26 +09:00
Shuhei Tanuma
d35aab6bcf bump down uv ext version. php-uv is very experimental 2012-07-01 22:36:40 +09:00
Shuhei Tanuma
8eff213350 add http parser support:
currently, php-uv has socket handling problem. (https://github.com/chobie/php-uv/issues/5)
if I don't support httpparser. hard to explain it.
2012-07-01 13:15:14 +09:00