www.beck-ipc.com

@CHIP-RTOS C Library - TCP/IP API


closesocket

Close a socket.

int closesocket ( int sd, int *error );

Parameters

sd

Socket descriptor.

error

Output parameter:  Failure code, 0 on success.

Return Value

-1: Failure (see error output parameter)
0: success

Comments

Closes the socket indicated by sd and releases all of its associated resources.

SC1x3/SC2x Comments

This legacy version of closesocket() specified here is not compatible to the BSD 4.4 Socket API.   The closesocket() 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 closesocket() to close_bsd().  The parameters to close_bsd() are identical to the parameters of the BSD4.4 socket close() 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