![]() |
|
| << Previous | Index | Next >> | |
| | |
int tcp_extlisten( tcp_Socket *s, int iface, word lport,
longword remip, word port, dataHandler_t datahandler,
word reserved, long buffer, int buflen );Description
This function tells DCRTCP that an incoming session for a particular port will be accepted. The
bufferandbuflenparameters allow a user to supply a socket buffer, instead of using a socket buffer from the pool.tcp_extlisten()is an extended version oftcp_listen().Parameters
s
- Pointer to the socket's data structure.
iface
- Local interface on which to open the socket. Use
IF_ANYif the socket is to accept connections from any interface. Otherwise, connections will be accepted only from the specified interface.
- Prior to Dynamic C 7.30 this parameter was not implemented and should be
IF_DEFAULT.
lport
- Port to listen on.
remip
- IP address to accept connections from or 0 for all.
port
- Port to accept connections from or 0 for all.
datahandler
- Function to call when data is received,
NULLfor placing data in the socket's receive buffer. Prior to Dynamic C 7.30, some details for implementation of this service had not been finalized. Insert a value ofNULLif you are using a version of Dynamic C prior to 7.30.
reserved
- Set to 0 for now. This parameter is for compatibility and possible future use.
buffer
- Address of user-supplied socket buffer in xmem. This is the return value of
xalloc(). Ifbufferis 0, the socket buffer for this socket is pulled from the buffer pool defined by the macroMAX_TCP_SOCKET_BUFFERS.
buflen
- Length of user-supplied socket buffer.
Return value
0: Failure.1: Success.Library
TCP.LIB
| TCP/IP Manual Vol 1 |
<<Previous | Index | Next>> | rabbit.com |