op_listen()
Note: Requires Shared Code functionality
Abstract
Sets a passive socket to receive new connection requests.
Syntax
op_listen (sockfd, backlog)
| Argument | Type | Description |
|---|---|---|
sockfd |
int |
File descriptor of the listen socket |
backlog |
int |
Size of queue for waiting connection requests |
Return Type
int
0 if successful; -1 if unsuccessful.
Header
shared_code_support.h
Details
This function is used after a socket is created and bound. It allows a remote computer to connect to the socket.