Differences between version 4 and revision by previous author of listen(2).
Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History
Newer page: | version 4 | Last edited on Wednesday, August 27, 2003 6:34:07 pm | by JohnMcPherson | Revert |
Older page: | version 3 | Last edited on Monday, March 10, 2003 2:26:30 pm | by PerryLorier | Revert |
@@ -26,11 +26,11 @@
!!CONFORMING TO
Single Unix, 4.4BSD, POSIX 1003.1g draft. The listen(2) function call first appeared in 4.2BSD.
!!BUGS
-If the socket is of type __AF_INET__, and the backlog argument is greater than the constant __SOMAXCONN__ (128 in Linux 2.0 & 2.2), it is silently truncated to __SOMAXCONN__. Don’
t rely on this value in portable applications since BSD (and some BSD-derived systems) limit the backlog to 5.
+If the socket is of type __AF_INET__, and the backlog argument is greater than the constant __SOMAXCONN__ (128 in Linux 2.0 & 2.2), it is silently truncated to __SOMAXCONN__. Don'
t rely on this value in portable applications since BSD (and some BSD-derived systems) limit the backlog to 5.
!!SEE ALSO
accept(2), connect(2), socket(2)
!!DISCUSSION
To use listen(2), you need a socket fd created with socket(2), and you probably also want to bind(2) it to a local port. So the sequence of actions you want are probably socket(2), bind(2) (optional, but recommended), listen(2), select(2) (optional), accept(2), close(2)