 |
accept ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
The accept function permits an incoming connection attempt on a socket. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
SOCKET accept(
SOCKET s,
struct sockaddr* addr,
int* addrlen
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER accept IN ws2_32;
INTEGER s,;
STRING @ addr,;
INTEGER @ addrlen
|
 |
 |
 |
| Parameters: |
 |
s
[in] Descriptor identifying a socket that has been placed in a listening state with the listen function. The connection is actually made with the socket that is returned by accept.
addr
[out] Optional pointer to a buffer that receives the address of the connecting entity, as known to the communications layer.
addrlen
[out] Optional pointer to an integer that contains the length of addr. |
 |
 |
| Return value: |
 |
If no error occurs, accept returns a value of type SOCKET that is a descriptor for the new socket. This returned value is a handle for the socket on which the actual connection is made.
Otherwise, a value of INVALID_SOCKET is returned, and a specific error code can be retrieved by calling WSAGetLastError.
|
 |
 |
| Word Index links for the accept : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2003-07-08 09:11:25 | | Modified: | 2003-07-08 09:13:43 | Visited in last 7 days: 17 |