Loadable Function: connect (s, serverinfo)

Connect socket.

Connects the socket s following the information in the struct serverinfo which must contain the following fields:

addr

a string with the host name to connect to

port

the port number to connect to (an integer)

On successful connect, the returned status is zero.

See the connect man pages for further details.

Package: sockets