Jump to main content

##

# TCPIP_TCP_SocketNetSet Function

## C

    bool TCPIP_TCP_SocketNetSet(
        TCP_SOCKET hTCP,
        TCPIP_NET_HANDLE hNet
    );

## Description

This function sets the network interface for an TCP socket

## Preconditions

TCP socket should have been opened with TCPIP_TCP_ClientOpen()/TCPIP_TCP_ServerOpen(). hTCP - valid socket.

## Parameters

Parameters | Description
--- | ---
hTCP | The TCP socket.
hNet | Interface handle.

## Returns

- True - Indicates success.
- False - Indicates failure.

## Remarks

An invalid hNet can be passed (0) so that the current network interface selection will be cleared.