Skip to content

CONNECT

Craig Edwards edited this page Apr 28, 2023 · 3 revisions

CONNECT

CONNECT integer-variable, string-expression, integer-expression

Connect to a TCP socket. The first parameter is an integer variable (if it does not exist, it will be created) to receive a handle to the connection for use with SOCKREAD, SOCKWRITE and SOCKCLOSE. The second parameter is a string representation of the IP address, to resolve a hostname to an IP address string use the DNS$ function. The final parameter is the port number to connect to.

On failure to connect, the integer variable will be less than zero.

Clone this wiki locally