tcp_connect(+Address, -Socket)

This is used by a Prolog client to connect to a server. Socket is unified with the active socket identifier created when the connection is established. The Address parameter is an address term, such as that returned by tcp_address_from_file/2.

Once a connection has been made to Socket later calls to tcp_connect/2 succeed immediately, without attempting to re-establish a connection to Socket.