Home
last modified time | relevance | path

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

123

/php-src/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-src/main/streams/
H A Dxp_socket.c63 if (!sock || sock->socket == -1) { in php_sockop_write()
128 if (!sock || sock->socket == -1) { in php_sock_stream_wait_for_data()
132 sock->timeout_event = 0; in php_sock_stream_wait_for_data()
163 if (!sock || sock->socket == -1) { in php_sockop_read()
169 if (sock->is_blocked) { in php_sockop_read()
174 (sock->timeout.tv_sec == 0 && sock->timeout.tv_usec == 0); in php_sockop_read()
219 if (!sock) { in php_sockop_close()
337 if (!sock) { in php_sockop_set_option()
501 if (!sock) { in php_sockop_cast()
963 sock->is_blocked = 1; in php_stream_generic_socket_factory()
[all …]
/php-src/sapi/fpm/fpm/
H A Dfpm_sockets.c33 int sock; member
195 ls->sock = sock; in fpm_sockets_hash_op()
208 int sock; in fpm_sockets_new_listening_socket() local
237 close(sock); in fpm_sockets_new_listening_socket()
254 close(sock); in fpm_sockets_new_listening_socket()
272 return sock; in fpm_sockets_new_listening_socket()
278 int sock; in fpm_sockets_get_listening_socket() local
288 return sock; in fpm_sockets_get_listening_socket()
334 return sock; in fpm_socket_af_inet_socket_by_addr()
393 return sock; in fpm_socket_af_inet_listening_socket()
[all …]
/php-src/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.phpt14 $sock = socket_import_stream($s0);
15 var_dump($sock);
16 socket_write($sock, "test message");
17 socket_close($sock);
H A Dsocket_export_stream-3.phpt20 $sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
21 socket_bind($sock, '0.0.0.0', 0);
22 socket_getsockname($sock, $unused, $port);
23 $stream = socket_export_stream($sock);
25 $so = socket_set_option($sock, IPPROTO_IP, MCAST_JOIN_GROUP, array(
H A Dbug_export_stream_type.phpt7 $sock = socket_create(AF_INET, SOCK_DGRAM, 0);
8 $stream = socket_export_stream($sock);
H A Dmcast_helpers.php.inc2 function checktimeout($sock, $limit) {
3 $readfs = array($sock);
H A Dsocket_create_listen.phpt13 $sock = socket_create_listen(31338);
14 socket_getsockname($sock, $addr, $port);
/php-src/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-src/ext/standard/tests/streams/
H A Dbug74556.phpt10 $sock = tempnam(sys_get_temp_dir(), 'bug74556') . '.sock';
11 $s = stream_socket_server("unix://$sock");
12 $c = stream_socket_client("unix://$sock");
18 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-src/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 \
33 PHP_ARG_WITH([mysql-sock],
[all …]
/php-src/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-src/ext/sockets/
H A Dmulticast.h68 php_socket *sock,
75 php_socket *sock,
83 php_socket *sock,
92 php_socket *sock,
101 php_socket *sock,
110 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-src/main/
H A Dnetwork.c459 php_socket_t sock; in php_network_bind_socket_to_local_addr() local
493 if (sock == SOCK_ERR) { in php_network_bind_socket_to_local_addr()
532 closesocket(sock); in php_network_bind_socket_to_local_addr()
534 sock = -1; in php_network_bind_socket_to_local_addr()
547 return sock; in php_network_bind_socket_to_local_addr()
822 php_socket_t sock; in php_network_connect_socket_to_host() local
978 closesocket(sock); in php_network_connect_socket_to_host()
980 sock = -1; in php_network_connect_socket_to_host()
986 return sock; in php_network_connect_socket_to_host()
1112 sock->is_blocked = 1; in _php_stream_sock_open_from_socket()
[all …]
/php-src/ext/curl/tests/
H A Dbug78775.phpt13 $sock = fsockopen("tls://google.com", 443);
15 var_dump($sock);
29 fwrite($sock, "GET / HTTP/1.0\n\n");
30 var_dump(fread($sock, 8));
/php-src/ext/openssl/tests/
H A Dbug46127.phpt20 $sock = stream_socket_server($serverUri, $errno, $errstr, $serverFlags, $serverCtx);
23 $link = stream_socket_accept($sock);
38 $sock = stream_socket_client($serverUri, $errno, $errstr, 2, $clientFlags, $clientCtx);
40 echo fgets($sock);
H A Dstream_server_reneg_limit.phpt54 foreach ($r as $sock) {
55 if ($sock === $server && ($client = stream_socket_accept($server, $timeout = 42))) {
58 } elseif ($sock !== $server) {
59 $clientId = (int) $sock;
60 $buffer = fread($sock, 1024);
63 } elseif (!is_resource($sock) || feof($sock)) {
H A Dbug68920.phpt37 $sock = stream_socket_client($serverUri, $errno, $errstr, 30, $clientFlags, $ctx);
38 var_dump($sock);
41 $sock = stream_socket_client($serverUri, $errno, $errstr, 30, $clientFlags, $ctx);
42 var_dump($sock);
45 $sock = stream_socket_client($serverUri, $errno, $errstr, 30, $clientFlags, $ctx);
46 var_dump($sock);
49 $sock = stream_socket_client($serverUri, $errno, $errstr, 30, $clientFlags, $ctx);
50 var_dump($sock);

Completed in 47 milliseconds

123