Home
last modified time | relevance | path

Searched refs:sock (Results 1 – 25 of 58) sorted by relevance

123

/PHP-8.0/win32/
H A Dsockets.c38 sock[1] = redirect = INVALID_SOCKET; in socketpair_win32()
40 sock[0] = socket(domain, type, protocol); in socketpair_win32()
41 if (INVALID_SOCKET == sock[0]) { in socketpair_win32()
57 if (listen(sock[0], 2) != 0) { in socketpair_win32()
62 sock[1] = socket(domain, type, protocol); in socketpair_win32()
64 sock[1] = WSASocket(domain, type, protocol, NULL, 0, 0); in socketpair_win32()
67 if (INVALID_SOCKET == sock[1]) { in socketpair_win32()
81 closesocket(sock[0]); in socketpair_win32()
82 sock[0] = redirect; in socketpair_win32()
88 closesocket(sock[0]); in socketpair_win32()
[all …]
H A Dsockets.h25 PHPAPI int socketpair_win32(int domain, int type, int protocol, SOCKET sock[2], int overlapped);
26 PHPAPI int socketpair(int domain, int type, int protocol, SOCKET sock[2]);
/PHP-8.0/sapi/phpdbg/
H A Dphpdbg_io.c103 pfd.fd = sock;
256 int sock = -1, rc; local
307 return sock;
316 return sock;
320 return sock;
328 return sock;
333 return sock;
341 return sock;
345 if (sock >= 0) {
347 closesocket(sock);
[all …]
H A Dphpdbg_io.h29 PHPDBG_API int phpdbg_consume_bytes(int sock, char *ptr, int len, int tmo);
30 PHPDBG_API int phpdbg_send_bytes(int sock, const char *ptr, int len);
31 PHPDBG_API int phpdbg_mixed_read(int sock, char *ptr, int len, int tmo);
32 PHPDBG_API int phpdbg_mixed_write(int sock, const char *ptr, int len);
36 PHPDBG_API void phpdbg_close_socket(int sock);
H A Dphpdbg_rinit_hook.c55 struct sockaddr_un sock; in PHP_RINIT_FUNCTION() local
57 size_t len = strlen(PHPDBG_WG(path)) + sizeof(sock.sun_family); in PHP_RINIT_FUNCTION()
60 sock.sun_family = AF_UNIX; in PHP_RINIT_FUNCTION()
61 strcpy(sock.sun_path, PHPDBG_WG(path)); in PHP_RINIT_FUNCTION()
63 if (connect(s, (struct sockaddr *)&sock, len) == -1) { in PHP_RINIT_FUNCTION()
/PHP-8.0/main/streams/
H A Dxp_socket.c63 if (!sock || sock->socket == -1) { in php_sockop_write()
127 if (!sock || sock->socket == -1) { in php_sock_stream_wait_for_data()
131 sock->timeout_event = 0; in php_sock_stream_wait_for_data()
158 if (!sock || sock->socket == -1) { in php_sockop_read()
162 if (sock->is_blocked) { in php_sockop_read()
168 …nr_bytes = recv(sock->socket, buf, XP_SOCK_BUF_SIZE(count), (sock->is_blocked && sock->timeout.tv_… in php_sockop_read()
196 if (!sock) { in php_sockop_close()
314 if (!sock) { in php_sockop_set_option()
466 if (!sock) { in php_sockop_cast()
923 sock->is_blocked = 1; in php_stream_generic_socket_factory()
[all …]
/PHP-8.0/sapi/fpm/fpm/
H A Dfpm_sockets.c33 int sock; member
190 ls->sock = sock; in fpm_sockets_hash_op()
203 int sock; in fpm_sockets_new_listening_socket() local
232 close(sock); in fpm_sockets_new_listening_socket()
249 close(sock); in fpm_sockets_new_listening_socket()
253 return sock; in fpm_sockets_new_listening_socket()
259 int sock; in fpm_sockets_get_listening_socket() local
269 return sock; in fpm_sockets_get_listening_socket()
315 return sock; in fpm_socket_af_inet_socket_by_addr()
374 return sock; in fpm_socket_af_inet_listening_socket()
[all …]
/PHP-8.0/ext/sockets/tests/
H A Dwsaprotocol_info_0.phpt17 if (($sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) === false) {
21 if (socket_bind($sock, $address, $port) === false) {
22 …fprintf(STDERR, "socket_bind() failed: reason: " . socket_strerror(socket_last_error($sock)) . "\n…
25 if (socket_listen($sock, 5) === false) {
26 …ntf(STDERR, "socket_listen() failed: reason: " . socket_strerror(socket_last_error($sock)) . "\n");
31 $info = socket_wsaprotocol_info_export($sock, $pid);
35 var_dump($sock, $sock2);
39 var_dump($sock, $sock2);
42 $info = socket_wsaprotocol_info_export($sock, 123412341);
44 socket_close($sock);
H A Dsocket_import_stream-1.phpt17 $sock = socket_import_stream($s0);
18 var_dump($sock);
19 socket_write($sock, "test message");
20 socket_close($sock);
H A Dsocket_export_stream-3.phpt21 $sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
22 socket_bind($sock, '0.0.0.0', 58393);
23 $stream = socket_export_stream($sock);
25 $so = socket_set_option($sock, IPPROTO_IP, MCAST_JOIN_GROUP, array(
/PHP-8.0/ext/standard/tests/streams/
H A Dbug74556.phpt9 $sock = tempnam(sys_get_temp_dir(), 'bug74556') . '.sock';
10 $s = stream_socket_server("unix://$sock");
11 $c = stream_socket_client("unix://$sock");
17 unlink($sock);
H A Dstream_socket_recvfrom.phpt8 $sock = stream_socket_server($serverUri, $errno, $errstr);
11 var_dump(stream_socket_recvfrom($sock, $sockLen));
12 var_dump(stream_socket_recvfrom($sock, $sockLen, STREAM_OOB));
13 var_dump(stream_socket_recvfrom($sock, $sockLen, STREAM_PEEK));
H A Dbug54623.phpt5 $sock = pfsockopen('udp://127.0.0.1', '63844');
6 var_dump((int)$sock);
7 @fwrite($sock, "1");
13 fwrite($sock, "3");
H A Dstream_socket_get_name.phpt8 $sock = stream_socket_server($serverUri, $errno, $errstr);
10 var_dump(stream_socket_get_name($sock, false));
11 var_dump(stream_socket_get_name($sock, true));
/PHP-8.0/ext/standard/tests/http/
H A Dserver.inc57 $sock = stream_socket_accept($server);
58 if (!$sock) {
66 stream_set_blocking($sock, false);
67 while (!feof($sock)) {
72 $line = stream_get_line($sock, 8192, "\r\n");
84 stream_set_blocking($sock, true);
95 stream_copy_to_stream($fd, $sock);
97 fclose($sock);
109 $sock = stream_socket_accept($server);
110 if (!$sock) {
[all …]
/PHP-8.0/ext/sockets/
H A Dmulticast.h67 php_socket *sock,
74 php_socket *sock,
82 php_socket *sock,
91 php_socket *sock,
100 php_socket *sock,
109 php_socket *sock,
H A Dmulticast.c369 php_socket *sock, in php_mcast_join() argument
379 php_socket *sock, in php_mcast_leave() argument
390 php_socket *sock, in php_mcast_join_source() argument
402 php_socket *sock, in php_mcast_leave_source() argument
414 php_socket *sock, in php_mcast_block_source() argument
426 php_socket *sock, in php_mcast_unblock_source() argument
440 php_socket *sock, in _php_mcast_join_leave() argument
458 if (sock->type == AF_INET) { in _php_mcast_join_leave()
479 else if (sock->type == AF_INET6) { in _php_mcast_join_leave()
503 php_socket *sock, in _php_mcast_source_op() argument
[all …]
/PHP-8.0/ext/standard/tests/network/
H A Dudgloop.phpt11 if (file_exists("/tmp/$uniqid.sock"))
12 die('Temporary socket /tmp/$uniqid.sock already exists.');
15 $server = stream_socket_server("udg:///tmp/$uniqid.sock", $errno, $errstr, STREAM_SERVER_BIND);
21 $client = stream_socket_client("udg:///tmp/$uniqid.sock");
33 unlink("/tmp/$uniqid.sock");
H A Dunixloop.phpt11 if (file_exists("/tmp/$uniqid.sock"))
15 $server = stream_socket_server("unix:///tmp/$uniqid.sock");
21 $client = stream_socket_client("unix:///tmp/$uniqid.sock");
40 unlink("/tmp/$uniqid.sock");
/PHP-8.0/ext/mysqli/
H A Dconfig.m44 /var/run/mysqld/mysqld.sock \
5 /var/tmp/mysql.sock \
6 /var/run/mysql/mysql.sock \
7 /var/lib/mysql/mysql.sock \
8 /var/mysql/mysql.sock \
9 /usr/local/mysql/var/mysql.sock \
10 /Private/tmp/mysql.sock \
11 /private/tmp/mysql.sock \
12 /tmp/mysql.sock \
35 PHP_ARG_WITH([mysql-sock],
[all …]
/PHP-8.0/main/
H A Dnetwork.c414 php_socket_t sock; local
432 if (sock == SOCK_ERR) {
492 closesocket(sock);
494 sock = -1;
507 return sock;
785 php_socket_t sock; local
955 closesocket(sock);
957 sock = -1;
963 return sock;
1089 sock->is_blocked = 1;
[all …]
/PHP-8.0/ext/curl/tests/
H A Dbug78775.phpt12 $sock = fsockopen("tls://google.com", 443);
14 var_dump($sock);
28 fwrite($sock, "GET / HTTP/1.0\n\n");
29 var_dump(fread($sock, 8));
/PHP-8.0/ext/openssl/tests/
H A Dbug46127.phpt19 $sock = stream_socket_server($serverUri, $errno, $errstr, $serverFlags, $serverCtx);
22 $link = stream_socket_accept($sock);
37 $sock = stream_socket_client($serverUri, $errno, $errstr, 2, $clientFlags, $clientCtx);
39 echo fgets($sock);
H A Dbug68920.phpt36 $sock = stream_socket_client($serverUri, $errno, $errstr, 30, $clientFlags, $ctx);
37 var_dump($sock);
40 $sock = stream_socket_client($serverUri, $errno, $errstr, 30, $clientFlags, $ctx);
41 var_dump($sock);
44 $sock = stream_socket_client($serverUri, $errno, $errstr, 30, $clientFlags, $ctx);
45 var_dump($sock);
48 $sock = stream_socket_client($serverUri, $errno, $errstr, 30, $clientFlags, $ctx);
49 var_dump($sock);
H A Dstream_server_reneg_limit.phpt53 foreach ($r as $sock) {
54 if ($sock === $server && ($client = stream_socket_accept($server, $timeout = 42))) {
57 } elseif ($sock !== $server) {
58 $clientId = (int) $sock;
59 $buffer = fread($sock, 1024);
62 } elseif (!is_resource($sock) || feof($sock)) {

Completed in 43 milliseconds

123