 |
listen ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
The listen function places a socket in a state in which it is listening for an incoming connection. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
int listen(
SOCKET s,
int backlog
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER listen IN ws2_32;
INTEGER s,;
INTEGER backlog
|
 |
 |
 |
| Parameters: |
 |
s
[in] Descriptor identifying a bound, unconnected socket.
backlog
[in] Maximum length of the queue of pending connections. |
 |
 |
| Return value: |
 |
| If no error occurs, listen returns zero. Otherwise, a value of SOCKET_ERROR is returned, and a specific error code can be retrieved by calling WSAGetLastError. |
 |
 |
| My comment: |
 |
| If backlog set to SOMAXCONN (0x7FFFFFFF), the underlying service provider responsible for socket s will set the backlog to a maximum reasonable value. |
 |
 |
| Word Index links for the listen : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2003-07-08 09:06:31 | | Modified: | 2003-07-08 09:10:57 | Visited in last 7 days: 13 |