Lines Matching refs:socket
10 $socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
11 if (!$socket) {
12 die('Unable to create AF_INET socket');
14 if (!socket_set_nonblock($socket)) {
15 die('Unable to set nonblocking mode for socket');
19 socket_sendto($socket, '', 1, 0, $address); // cause warning
20 if (!socket_bind($socket, $address, 1223)) {
24 var_dump(socket_recvfrom($socket, $buf, 12, 0, $from, $port)); //false (EAGAIN - no warning)
28 $bytes_sent = socket_sendto($socket, $msg, $len, 0, $address, 1223);
30 die('An error occurred while sending to the socket');
37 socket_recvfrom($socket, $buf, 12, 0); // cause warning
38 socket_recvfrom($socket, $buf, 12, 0, $from); // cause warning
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);