www.beck-ipc.com

@CHIP-RTOS C Library - TCP/IP API


listen

Listen for incoming connections.

int listen ( int sd, int backlog, int *error );

Parameters

sd

Socket descriptor.

backlog

The maximum number (limited to 5) of allowed outstanding connections

error

Output parameter:  Failure code, 0 on success.

Return Value

0 = success
Non-zero = Failure (see error output parameter)

Comments

This API function places the socket in passive mode and sets the number of incoming TCP connections that the system will queue (backlog ).

This call is used by a TCP server.

SC1x3/SC2x Comments

This legacy version of listen() specified here is not compatible to the BSD 4.4 Socket API.   The listen() function can be used in BSD 4.4 compatible mode if the compilation switch

     #define BSD44_SOCKET_API_STYLE

is defined in the user application prior to including the Beck C-Library header files.   Using this switch the C-Library TCPIP_Socket.H include file redefines listen() to listen_bsd().  The parameters to listen_bsd() are identical to the parameters of the BSD4.4 socket listen() function.

See Also

RTOS API

This library function invokes a RTOS software interrupt. Refer to this RTOS API function's documentation for more details.

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3SC2x
    V1.00V1.00V1.00V0.90V1.00

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document