Lines Matching refs:socket
33 #include <sys/socket.h>
40 * This program creates a socket and then begins an infinite loop. Each time
55 /* Create socket */
56 sock = socket(AF_INET, SOCK_STREAM, 0);
58 perror("opening stream socket");
61 /* Name socket using wildcards */
66 perror("binding stream socket");
72 perror("getting socket name");
75 printf("Socket has port #%d\en", ntohs(server.sin_port));
96 * Since this program has an infinite loop, the socket "sock" is