Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ connect(3N) — GL1 W2.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

accept(3N)

socket(3N)

tcp(7)

CONNECT(3N)  —  Silicon Graphics

NAME

connect − initiate a connection on a socket

SYNOPSIS

#include <sys/socket.h> connect(s, addr)
int s;
struct sockaddr *addr;

DESCRIPTION

Connect initiates a connection request to the entity at addr using the underlying protocol of the socket s.  When the connection is established, a zero value is returned. 

If the socket is already connected, a value of −1 is returned and errno is set to EISCONN.  Failure to connect frequently results in ETIMEDOUT or EREFUSED errors. 

SEE ALSO

accept(3N), socket(3N), tcp(7)

BUGS

The socket’s state is not restored properly if this call fails.  The work around is: close the socket and recreate it. 

Version 2.3  —  July 04, 1985

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026