Lines Matching refs:socket
15 $socket = socket_create(AF_INET6, SOCK_DGRAM, SOL_UDP);
16 if (!$socket) {
17 die('Unable to create AF_INET6 socket');
19 if (!socket_set_nonblock($socket)) {
20 die('Unable to set nonblocking mode for socket');
22 socket_recvfrom($socket, $buf, 12, 0, $from, $port); // 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 $bytes_received = socket_recvfrom($socket, $buf, 12, 0, $from, $port);
41 die('An error occurred while receiving from the socket');
47 socket_close($socket);