Home
last modified time | relevance | path

Searched refs:socket (Results 26 – 50 of 476) sorted by relevance

12345678910>>...20

/PHP-8.2/ext/sockets/tests/
H A Dsocket_sendto_zerocopy.phpt20 $socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
21 if (!$socket) {
22 die('Unable to create AF_UNIX socket');
26 die('Unable to create AF_UNIX socket');
28 if (!socket_set_option($socket, SOL_SOCKET, SO_ZEROCOPY, 1)) {
29 die("Unable to set the socket option to SO_ZEROCOPY");
32 die('Unable to set nonblocking mode for socket');
43 $bytes_sent = socket_sendto($socket, $msg, $len, MSG_ZEROCOPY, $address, $port);
50 socket_close($socket);
H A Dsocket_clear_error-win32.phpt2 void socket_clear_error ([ resource $socket ] ) ;
16 $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
17 $socketConn = socket_connect($socket, "127.0.0.1", 21248);
18 var_dump(socket_last_error($socket));
19 socket_clear_error($socket);
20 var_dump(socket_last_error($socket));
H A Dsocket_tcp_congestion.phpt18 $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
19 if (!$socket) die ("socket failed");
20 $r = socket_get_option($socket, SOL_TCP, TCP_CONGESTION);
22 var_dump(socket_set_option($socket, SOL_TCP, TCP_CONGESTION, $algo));
23 $r = socket_get_option($socket, SOL_TCP, TCP_CONGESTION);
H A Dsocket_getpeername_ipv4loop.phpt13 /* Setup socket server */
16 die('Unable to create AF_INET socket [server]');
32 die('Unable to listen on socket');
38 die('Unable to create AF_INET socket [client]');
41 die('Unable to connect to server socket');
45 $socket = socket_accept($server);
46 if (!$socket) {
56 socket_close($socket);
H A Dsocket_getpeername_ipv6loop.phpt18 /* Setup socket server */
21 die('Unable to create AF_INET6 socket [server]');
37 die('Unable to listen on socket');
43 die('Unable to create AF_INET6 socket [client]');
46 die('Unable to connect to server socket');
50 $socket = socket_accept($server);
51 if (!$socket) {
61 socket_close($socket);
H A Dsocket_set_block-retval.phpt8 $socket = socket_create_listen(0);
9 var_dump(socket_set_block($socket));
10 socket_close($socket);
23 socket_set_block(): Argument #1 ($socket) has already been closed
H A Dsocket_set_nonblock-retval.phpt8 $socket = socket_create_listen(0);
9 var_dump(socket_set_nonblock($socket));
10 socket_close($socket);
23 socket_set_nonblock(): Argument #1 ($socket) has already been closed
H A Dsocket_export_stream-4-win.phpt56 echo "\nunset socket\n";
70 echo "\nclose socket\n";
89 unset socket
97 …t blocking mode [%d]: An operation was attempted on something that is not a socket in %s on line %d
100 …et_get_option(): Unable to retrieve socket option [%d]: An operation was attempted on something th…
104 close socket
107 socket_set_block Error: socket_set_block(): Argument #1 ($socket) has already been closed
109 socket_get_option Error: socket_get_option(): Argument #1 ($socket) has already been closed
/PHP-8.2/ext/standard/tests/file/
H A Dfgets_socket_variation1.phpt2 fgets() with a socket stream
10 /* Setup socket server */
21 die("Unable to create socket");
25 $socket = stream_socket_accept($server);
28 fwrite($socket, "line1\nline2\nline3\n");
37 echo "\n\nClose the server side socket and read the remaining data from the client\n";
38 fclose($socket);
61 Close the server side socket and read the remaining data from the client
H A Dfgets_socket_variation2.phpt2 fgets() over a socket with more than a buffer's worth of data
21 /* Setup socket server */
32 die("Unable to create socket");
36 $socket = stream_socket_accept($server);
42 var_dump(fwrite($socket, $data));
43 fclose($socket);
53 echo "\nClose the server side socket and read the remaining data from the client\n";
68 Close the server side socket and read the remaining data from the client
/PHP-8.2/ext/pdo_firebird/tests/
H A Dpayload_server.php3 $socket = stream_socket_server("tcp://localhost:0", $errno, $errstr); variable
4 if (!$socket) {
16 fputs(STDERR, "FB payload server listening on " . stream_socket_get_name($socket, false) . "\n");
18 while ($conn = stream_socket_accept($socket)) {
/PHP-8.2/ext/mysqli/tests/
H A Dmysqli_pconn_twice.phpt19 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
20 … Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
21 $host, $user, $db, $port, $socket);
23 if (true !== ($tmp = my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)))
37 if (!$link = new my_mysqli($host, $user, $passwd, $db, $port, $socket))
39 $host, $user, $db, $port, $socket);
42 if (true !== ($tmp = $link->real_connect($host, $user, $passwd, $db, $port, $socket)))
56 if (true !== ($tmp = $link->connect($host, $user, $passwd, $db, $port, $socket)))
59 if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket))
61 $host, $user, $db, $port, $socket);
[all …]
H A Dmysqli_pconn_conn_multiple.phpt19 if (!$link = my_mysqli_connect($phost, $user, $passwd, $db, $port, $socket))
21 $phost, $user, $db, $port, $socket);
44 if (!$link = new my_mysqli($phost, $user, $passwd, $db, $port, $socket))
46 $phost, $user, $db, $port, $socket);
72 if (!$link = mysqli_connect($phost, $user, $passwd, $db, $port, $socket))
74 $phost, $user, $db, $port, $socket);
83 $host, $user, $db, $port, $socket);
106 if (!$link = new my_mysqli($host, $user, $passwd, $db, $port, $socket))
108 $host, $user, $db, $port, $socket);
134 if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket))
[all …]
H A Dmysqli_connect_twice.phpt13 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
14 … Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
15 $host, $user, $db, $port, $socket);
20 if (true !== ($tmp = my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)))
38 if (!$link = new my_mysqli($host, $user, $passwd, $db, $port, $socket))
40 $host, $user, $db, $port, $socket);
45 if (true !== ($tmp = $link->real_connect($host, $user, $passwd, $db, $port, $socket)))
63 if (true !== ($tmp = $link->connect($host, $user, $passwd, $db, $port, $socket)))
66 if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket))
68 $host, $user, $db, $port, $socket);
[all …]
H A Dmysqli_connect_error.phpt23 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
24 … Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
25 $host, $user, $db, $port, $socket);
32 … = @my_mysqli_connect($host, $user . 'unknown_really', $passwd . 'non_empty', $db, $port, $socket))
33 …e server should fail using host=%s, user=%s, passwd=***non_empty, dbname=%s, port=%s, socket=%s\n",
34 $host, $user . 'unknown_really', $db, $port, $socket);
H A Dmysqli_report_new.phpt9 if (!$link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
10 … Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
11 $host, $user, $db, $port, $socket));
30 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
31 … Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
32 $host, $user, $db, $port, $socket);
H A Dmysqli_change_user_new.phpt9 if (!$link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
10 … Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
11 $host, $user, $db, $port, $socket));
26 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
27 … Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
28 $host, $user, $db, $port, $socket);
H A D001.phpt16 $link = my_mysqli_connect($host, $user, $passwd, "", $port, $socket);
22 $test.= (my_mysqli_real_connect($link, $host, $user, $passwd, "", $port, $socket) )
28 $test .= (my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket))
34 $test .= (my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket))
43 if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket))
52 …$test .= (my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, MYSQLI_CLIENT_…
H A Dmysqli_connect_errno.phpt23 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
24 … Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
25 $host, $user, $db, $port, $socket);
32 … = @my_mysqli_connect($host, $user . 'unknown_really', $passwd . 'non_empty', $db, $port, $socket);
34 …ld fail using host=%s, user=%s, passwd=***non_empty, dbname=%s, port=%s, socket=%s, expecting bool…
35 … $host, $user . 'unknown_really', $db, $port, $socket, gettype($link), var_export($link, true));
/PHP-8.2/ext/sockets/
H A Dsockets.stub.php1702 function socket_accept(Socket $socket): Socket|false {} argument
1704 function socket_set_nonblock(Socket $socket): bool {} argument
1706 function socket_set_block(Socket $socket): bool {} argument
1708 function socket_listen(Socket $socket, int $backlog = 0): bool {} argument
1710 function socket_close(Socket $socket): void {} argument
1720 function socket_getsockname(Socket $socket, &$address, &$port = null): bool {} argument
1734 function socket_bind(Socket $socket, string $address, int $port = 0): bool {} argument
1777 function socket_shutdown(Socket $socket, int $mode = 2): bool {} argument
1780 function socket_last_error(?Socket $socket = null): int {} argument
1782 function socket_clear_error(?Socket $socket = null): void {} argument
[all …]
/PHP-8.2/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()
204 if (sock->socket == -1) in php_sockop_close()
205 sock->socket = SOCK_ERR; in php_sockop_close()
207 if (sock->socket != SOCK_ERR) { in php_sockop_close()
222 closesocket(sock->socket); in php_sockop_close()
223 sock->socket = SOCK_ERR; in php_sockop_close()
237 return fsync(sock->socket); in php_sockop_flush()
338 if (sock->socket == -1) { in php_sockop_set_option()
856 clisockdata->socket = clisock; in php_tcp_sockop_accept()
[all …]
/PHP-8.2/ext/standard/tests/streams/
H A Dstream_get_meta_data_socket_variation4.phpt2 Testing stream_get_meta_data() "eof" field on a udp socket
6 /* Setup socket server */
12 die("Unable to create socket");
16 $socket = stream_socket_accept($server);
19 fwrite($socket, "abcdefg\n1234567\nxyzxyz\n");
26 echo "\n\nClose the server side socket and read the remaining data from the client:\n";
27 fclose($socket);
76 Close the server side socket and read the remaining data from the client:
H A Dgh10406.phpt2 GH-10406: feof() behavior change for UNIX based socket resources
9 $socket_path = '/tmp/gh-10406-test.socket';
15 $socket = stream_socket_server('unix://' . $socket_path);
16 var_dump(feof($socket));
H A Dstream_get_meta_data_socket_variation1.phpt2 Testing stream_get_meta_data() "unread_bytes" field on a udp socket
6 /* Setup socket server */
12 die("Unable to create socket");
16 $socket = stream_socket_accept($server);
19 fwrite($socket, "abcdefg\n1234567\nxyzxyz\n");
30 echo "\n\nClose the server side socket and read the remaining data from the client:\n";
31 fclose($socket);
97 Close the server side socket and read the remaining data from the client:
/PHP-8.2/ext/standard/tests/network/
H A Dtcp6loop.phpt18 /* Setup socket server */
26 die('Unable to create AF_INET6 socket [server]');
32 die('Unable to create AF_INET6 socket [client]');
36 $socket = stream_socket_accept($server);
37 if (!$socket) {
43 $data = fread($socket, 10);
47 fclose($socket);

Completed in 40 milliseconds

12345678910>>...20