2 % (c) The GRASP/AQUA Project, Glasgow University, 1996
4 \subsection[listenSocket.lc]{Indicate willingness to receive connections}
11 #ifdef HAVE_SYS_TYPES_H
12 #include <sys/types.h>
15 #ifdef HAVE_SYS_SOCKET_H
16 #include <sys/socket.h>
20 listenSocket(int sockfd, int backlog)
24 while ((rc = listen(sockfd, backlog)) < 0) {
32 ghc_errtype = ERR_INVALIDARGUMENT;
33 ghc_errstr = "Not a valid descriptor";
36 ghc_errtype = ERR_INVALIDARGUMENT;
37 ghc_errstr = "Descriptor not a socket";
40 ghc_errtype = ERR_INVALIDARGUMENT;
41 ghc_errstr = "Socket not of type that supports listen";