-
Notifications
You must be signed in to change notification settings - Fork 3.2k
/
Copy pathphp_swoole_hook_sockets.stub.php
81 lines (54 loc) · 3.31 KB
/
php_swoole_hook_sockets.stub.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
function swoole_native_socket_create_listen(int $port, int $backlog = 128): Swoole\Coroutine\Socket |false {}
function swoole_native_socket_accept(Swoole\Coroutine\Socket $socket): Swoole\Coroutine\Socket |false {}
function swoole_native_socket_set_nonblock(Swoole\Coroutine\Socket $socket): bool {}
function swoole_native_socket_set_block(Swoole\Coroutine\Socket $socket): bool {}
function swoole_native_socket_listen(Swoole\Coroutine\Socket $socket, int $backlog = 0): bool {}
function swoole_native_socket_close(Swoole\Coroutine\Socket $socket): void {}
function swoole_native_socket_write(Swoole\Coroutine\Socket $socket, string $data, ?int $length = null): int|false {}
function swoole_native_socket_read(Swoole\Coroutine\Socket $socket, int $length, int $mode = PHP_BINARY_READ): string|false {}
/**
* @param string $address
* @param int $port
*/
function swoole_native_socket_getsockname(Swoole\Coroutine\Socket $socket, &$address, &$port = null): bool {}
/**
* @param string $address
* @param int $port
*/
function swoole_native_socket_getpeername(Swoole\Coroutine\Socket $socket, &$address, &$port = null): bool {}
function swoole_native_socket_create(int $domain, int $type, int $protocol): Swoole\Coroutine\Socket |false {}
function swoole_native_socket_connect(Swoole\Coroutine\Socket $socket, string $address, ?int $port = null): bool {}
function swoole_native_socket_strerror(int $error_code): string {}
function swoole_native_socket_bind(Swoole\Coroutine\Socket $socket, string $address, int $port = 0): bool {}
/** @param string|null $data */
function swoole_native_socket_recv(Swoole\Coroutine\Socket $socket, &$data, int $length, int $flags): int|false {}
function swoole_native_socket_send(Swoole\Coroutine\Socket $socket, string $data, int $length, int $flags): int|false {}
/**
* @param string $data
* @param string $address
* @param int $port
*/
function swoole_native_socket_recvfrom(Swoole\Coroutine\Socket $socket, &$data, int $length, int $flags, &$address, &$port = null): int|false {}
function swoole_native_socket_sendto(Swoole\Coroutine\Socket $socket, string $data, int $length, int $flags, string $address, ?int $port = null): int|false {}
function swoole_native_socket_get_option(Swoole\Coroutine\Socket $socket, int $level, int $option): array|int|false {}
/** @alias socket_get_option */
function swoole_native_socket_getopt(Swoole\Coroutine\Socket $socket, int $level, int $option): array|int|false {}
/** @param array|string|int $value */
function swoole_native_socket_set_option(Swoole\Coroutine\Socket $socket, int $level, int $option, $value): bool {}
/**
* @param array|string|int $value
* @alias socket_set_option
*/
function swoole_native_socket_setopt(Swoole\Coroutine\Socket $socket, int $level, int $option, $value): bool {}
#ifdef HAVE_SOCKETPAIR
/** @param array $pair */
function swoole_native_socket_create_pair(int $domain, int $type, int $protocol, &$pair): ?bool {}
#endif
#ifdef HAVE_SHUTDOWN
function swoole_native_socket_shutdown(Swoole\Coroutine\Socket $socket, int $mode = 2): bool {}
#endif
function swoole_native_socket_last_error(?Swoole\Coroutine\Socket $socket = null): int {}
function swoole_native_socket_clear_error(?Swoole\Coroutine\Socket $socket = null): void {}
/** @param resource $stream */
function swoole_native_socket_import_stream($stream): Swoole\Coroutine\Socket {}