TcpIp_Connect


Connects as a client to a remote TCP server socket.

Syntax

C++
Python
 
def TcpIp_Connect(
	state: TcpIpConnectState,
	inHost: str,
	inPort: int,
	/,
	*,
	inTimeout: int | None = None,
	inKeepAliveTime: int | None = None,
	inNoSendDelay: bool = False
)
-> outSocket: int | None

Parameters

Name Type Range Default Description
Input will be modified ioState TcpIpConnectState
Input value inHost str The hostname or IP address to connect to.
Input value inPort int 7 - 65535 TCP port of host to connect to.
Input value inTimeout int | None 500 - None Timeout in milliseconds, block if not specified.
Input value inKeepAliveTime int | None 2000 - None When specified activates Tcp/Ip keep alive on new socket with given idle time.
Input value inNoSendDelay bool False Disables the Nagle algorithm for the socket to send the outgoing packets without a delay.
Output value outSocket int | None Connected socket ID.