/PHP-7.0/win32/ |
H A D | sockets.c | 42 sock[0] = sock[1] = redirect = INVALID_SOCKET; in socketpair() 45 sock[0] = socket(domain, type, protocol); in socketpair() 46 if (INVALID_SOCKET == sock[0]) { in socketpair() 62 if (listen(sock[0], 2) != 0) { in socketpair() 66 sock[1] = socket(domain, type, protocol); in socketpair() 67 if (INVALID_SOCKET == sock[1]) { in socketpair() 76 redirect = accept(sock[0],(struct sockaddr*)&address, &size); in socketpair() 81 closesocket(sock[0]); in socketpair() 82 sock[0] = redirect; in socketpair() 88 closesocket(sock[0]); in socketpair() [all …]
|
/PHP-7.0/main/streams/ |
H A D | xp_socket.c | 67 if (!sock || sock->socket == -1) { in php_sockop_write() 126 if (!sock || sock->socket == -1) { in php_sock_stream_wait_for_data() 130 sock->timeout_event = 0; in php_sock_stream_wait_for_data() 157 if (!sock || sock->socket == -1) { in php_sockop_read() 161 if (sock->is_blocked) { in php_sockop_read() 167 …nr_bytes = recv(sock->socket, buf, XP_SOCK_BUF_SIZE(count), (sock->is_blocked && sock->timeout.tv_… in php_sockop_read() 191 if (!sock) { in php_sockop_close() 303 if (!sock) { in php_sockop_set_option() 456 if (!sock) { in php_sockop_cast() 896 sock->is_blocked = 1; in php_stream_generic_socket_factory() [all …]
|
/PHP-7.0/sapi/phpdbg/ |
H A D | phpdbg_io.c | 105 pfd.fd = sock; 258 int sock = -1, rc; local 310 return sock; 320 return sock; 324 return sock; 335 return sock; 340 return sock; 348 return sock; 352 if (sock >= 0) { 354 closesocket(sock); [all …]
|
H A D | phpdbg_io.h | 31 PHPDBG_API int phpdbg_consume_bytes(int sock, char *ptr, int len, int tmo); 32 PHPDBG_API int phpdbg_send_bytes(int sock, const char *ptr, int len); 33 PHPDBG_API int phpdbg_mixed_read(int sock, char *ptr, int len, int tmo); 34 PHPDBG_API int phpdbg_mixed_write(int sock, const char *ptr, int len); 38 PHPDBG_API void phpdbg_close_socket(int sock);
|
H A D | phpdbg_rinit_hook.c | 57 struct sockaddr_un sock; in PHP_RINIT_FUNCTION() local 59 int len = strlen(PHPDBG_WG(path)) + sizeof(sock.sun_family); in PHP_RINIT_FUNCTION() 62 sock.sun_family = AF_UNIX; in PHP_RINIT_FUNCTION() 63 strcpy(sock.sun_path, PHPDBG_WG(path)); in PHP_RINIT_FUNCTION() 65 if (connect(s, (struct sockaddr *)&sock, len) == -1) { in PHP_RINIT_FUNCTION()
|
/PHP-7.0/sapi/fpm/fpm/ |
H A D | fpm_sockets.c | 35 int sock; member 153 ls->sock = sock; in fpm_sockets_hash_op() 166 int sock; in fpm_sockets_new_listening_socket() local 195 close(sock); in fpm_sockets_new_listening_socket() 212 close(sock); in fpm_sockets_new_listening_socket() 216 return sock; in fpm_sockets_new_listening_socket() 222 int sock; in fpm_sockets_get_listening_socket() local 226 return sock; in fpm_sockets_get_listening_socket() 232 return sock; in fpm_sockets_get_listening_socket() 308 return sock; in fpm_socket_af_inet_listening_socket() [all …]
|
/PHP-7.0/ext/standard/tests/streams/ |
H A D | stream_socket_enable_crypto.phpt | 17 $sock = stream_socket_server($serverUri, $errno, $errstr); 19 if (is_resource($sock)) { 20 var_dump(stream_socket_enable_crypto($sock, false)); 21 var_dump(stream_socket_enable_crypto($sock, true)); 22 var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv23_CLIENT)); 23 var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv3_CLIENT)); 24 var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv2_CLIENT)); 25 var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)); 27 var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv2_SERVER)); 29 var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_TLS_SERVER)); [all …]
|
H A D | stream_socket_enable_crypto-win32.phpt | 17 $sock = stream_socket_server($serverUri, $errno, $errstr); 19 if (is_resource($sock)) { 20 var_dump(stream_socket_enable_crypto($sock, false)); 21 var_dump(stream_socket_enable_crypto($sock, true)); 22 var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv2_CLIENT)); 23 var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv3_CLIENT)); 25 var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)); 26 var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv2_SERVER)); 27 var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv3_SERVER)); 29 var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_TLS_SERVER)); [all …]
|
H A D | bug74556.phpt | 9 $sock = __DIR__ . '/bug74556.sock'; 10 $s = stream_socket_server("unix://$sock"); 11 $c = stream_socket_client("unix://$sock"); 19 unlink(__DIR__ . '/bug74556.sock');
|
H A D | stream_socket_recvfrom.phpt | 14 $sock = stream_socket_server($serverUri, $errno, $errstr); 17 var_dump(stream_socket_recvfrom($sock, $sockLen)); 18 var_dump(stream_socket_recvfrom($sock, $sockLen, STREAM_OOB)); 19 var_dump(stream_socket_recvfrom($sock, $sockLen, STREAM_PEEK)); 23 fclose($sock); 26 unset($sock);
|
H A D | bug54623.phpt | 5 $sock = pfsockopen('udp://127.0.0.1', '63844'); 6 var_dump((int)$sock); 7 @fwrite($sock, "1"); 12 fwrite($sock, "3");
|
H A D | stream_socket_get_name.phpt | 14 $sock = stream_socket_server($serverUri, $errno, $errstr); 16 var_dump(stream_socket_get_name($sock, false)); 17 var_dump(stream_socket_get_name($sock, true)); 22 unset($sock);
|
H A D | stream_socket_sendto.phpt | 15 $sock = stream_socket_server($serverUri, $errno, $errstr); 17 if (is_resource($sock)) { 18 fwrite($sock, $stringFWrite); 20 var_dump(stream_socket_sendto($sock)); 21 var_dump(stream_socket_sendto($sock, $stringSocket)); 22 var_dump(stream_socket_sendto($sock, $stringSocket, STREAM_OOB)); 23 var_dump(stream_socket_sendto($sock, $stringSocket, STREAM_OOB, $serverUri)); 24 var_dump(stream_socket_sendto($sock, $stringSocket, STREAM_OOB, $serverUrl));
|
/PHP-7.0/ext/standard/tests/http/ |
H A D | server.inc | 41 $sock = stream_socket_accept($server); 42 if (!$sock) { 50 stream_set_blocking($sock, 0); 51 while (!feof($sock)) { 53 list($r, $w, $e) = array(array($sock), null, null); 56 $line = stream_get_line($sock, 8192, "\r\n"); 68 stream_set_blocking($sock, 1); 73 stream_copy_to_stream($sock, $output, $content_length); 79 stream_copy_to_stream($fd, $sock); 81 fclose($sock);
|
/PHP-7.0/ext/sockets/ |
H A D | multicast.h | 71 php_socket *sock, 78 php_socket *sock, 86 php_socket *sock, 95 php_socket *sock, 104 php_socket *sock, 113 php_socket *sock,
|
H A D | multicast.c | 382 php_socket *sock, in php_mcast_join() argument 392 php_socket *sock, in php_mcast_leave() argument 403 php_socket *sock, in php_mcast_join_source() argument 415 php_socket *sock, in php_mcast_leave_source() argument 427 php_socket *sock, in php_mcast_block_source() argument 439 php_socket *sock, in php_mcast_unblock_source() argument 453 php_socket *sock, in _php_mcast_join_leave() argument 471 if (sock->type == AF_INET) { in _php_mcast_join_leave() 491 else if (sock->type == AF_INET6) { in _php_mcast_join_leave() 515 php_socket *sock, in _php_mcast_source_op() argument [all …]
|
/PHP-7.0/ext/sockets/tests/ |
H A D | socket_import_stream-1.phpt | 18 $sock = socket_import_stream($s0); 19 var_dump($sock); 20 socket_write($sock, "test message"); 21 socket_close($sock);
|
H A D | socket_export_stream-3.phpt | 21 $sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); 22 socket_bind($sock, '0.0.0.0', 58381); 23 $stream = socket_export_stream($sock); 25 $so = socket_set_option($sock, IPPROTO_IP, MCAST_JOIN_GROUP, array(
|
/PHP-7.0/ext/standard/tests/network/ |
H A D | udgloop.phpt | 11 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 D | unixloop.phpt | 11 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-7.0/main/ |
H A D | network.c | 429 php_socket_t sock; local 447 if (sock == SOCK_ERR) { 502 closesocket(sock); 504 sock = -1; 517 return sock; 786 php_socket_t sock; local 944 closesocket(sock); 946 sock = -1; 952 return sock; 1105 sock->is_blocked = 1; [all …]
|
/PHP-7.0/ext/openssl/tests/ |
H A D | bug46127.phpt | 17 $sock = stream_socket_server($serverUri, $errno, $errstr, $serverFlags, $serverCtx); 20 $link = stream_socket_accept($sock); 34 $sock = stream_socket_client($serverUri, $errno, $errstr, 2, $clientFlags, $clientCtx); 36 echo fgets($sock);
|
H A D | bug68920.phpt | 32 $sock = stream_socket_client($serverUri, $errno, $errstr, 30, $clientFlags, $ctx); 33 var_dump($sock); 36 $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);
|
H A D | stream_server_reneg_limit.phpt | 46 foreach ($r as $sock) { 47 if ($sock === $server && ($client = stream_socket_accept($server, $timeout = 42))) { 50 } elseif ($sock !== $server) { 51 $clientId = (int) $sock; 52 $buffer = fread($sock, 1024); 55 } elseif (!is_resource($sock) || feof($sock)) {
|
/PHP-7.0/ext/mysqli/ |
H A D | config.m4 | 8 /var/run/mysqld/mysqld.sock \ 9 /var/tmp/mysql.sock \ 10 /var/run/mysql/mysql.sock \ 11 /var/lib/mysql/mysql.sock \ 12 /var/mysql/mysql.sock \ 13 /usr/local/mysql/var/mysql.sock \ 14 /Private/tmp/mysql.sock \ 15 /private/tmp/mysql.sock \ 16 /tmp/mysql.sock \ 43 PHP_ARG_WITH(mysql-sock, for specified location of the MySQL UNIX socket, [all …]
|