is_tcp_socket()

is_tcp_socket()#

is_tcp_socket() determines whether the given file descriptor corresponds to a TCP socket.

Prototype

BOOL is_tcp_socket(
    int fd
);

Parameters

Key

Type

Description

fd

int

The file descriptor to check.


Return Value

Returns TRUE if the file descriptor corresponds to a TCP socket, otherwise returns FALSE.

Notes

This function checks the socket type using system-level socket options.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples