tcp_connect

tcp_connect — creates a client-side TCP socket connection.

Syntax

tcp_connect (host, port)

		

Arguments

host

The IP address of the host machine.

port

The port to connect to.

Returns

A file descriptor for a new, connected socket.

Description

This function creates a connected socket. This can be accessed with Gamma fd_* functions such as fd_write and fd_read.

Example

See the example for tcp_accept.

See Also

tcp_accept, tcp_listen