Lines Matching defs:sockets
3956 int sockets[2] = {-1, -1};
3966 sockets[i] = PerlSock_socket(AF_INET, SOCK_DGRAM, PF_INET);
3967 if (sockets[i] == -1)
3973 if (PerlSock_bind(sockets[i], (struct sockaddr *) &addresses[i],
3978 /* Now have 2 UDP sockets. Find out which port each is connected to, and
3982 if (PerlSock_getsockname(sockets[i], (struct sockaddr *) &addresses[i],
3988 if (PerlSock_connect(sockets[!i], (struct sockaddr *) &addresses[i],
3993 /* Now we have 2 sockets connected to each other. I don't trust some other
4002 got = PerlLIO_write(sockets[i], &port, sizeof(port));
4022 int max = sockets[1] > sockets[0] ? sockets[1] : sockets[0];
4026 FD_SET(sockets[0], &rset);
4027 FD_SET(sockets[1], &rset);
4030 if (got != 2 || !FD_ISSET(sockets[0], &rset)
4031 || !FD_ISSET(sockets[1], &rset)) {
4048 got = PerlSock_recvfrom(sockets[i], (char *) &buffer,
4052 got = PerlSock_recvfrom(sockets[i], (char *) &buffer,
4071 fd[0] = sockets[0];
4072 fd[1] = sockets[1];
4082 if (sockets[0] != -1)
4083 PerlLIO_close(sockets[0]);
4084 if (sockets[1] != -1)
4085 PerlLIO_close(sockets[1]);
4159 two sockets. */