Lines Matching refs:socket
14 $socket = socket_create(AF_INET6, SOCK_DGRAM, SOL_UDP);
15 if (!$socket) {
16 die('Unable to create AF_INET6 socket');
18 if (!socket_set_nonblock($socket)) {
19 die('Unable to set nonblocking mode for socket');
21 socket_recvfrom($socket, $buf, 12, 0, $from, $port); // cause warning
23 socket_sendto($socket, '', 1, 0, $address); // cause warning
24 if (!socket_bind($socket, $address, 1223)) {
30 $bytes_sent = socket_sendto($socket, $msg, $len, 0, $address, 1223);
32 die('An error occurred while sending to the socket');
39 socket_recvfrom($socket, $buf, 12, 0); // cause warning
40 socket_recvfrom($socket, $buf, 12, 0, $from); // cause warning
41 $bytes_received = socket_recvfrom($socket, $buf, 12, 0, $from, $port);
43 die('An error occurred while receiving from the socket');
49 socket_close($socket);