- int socket ( int family , int
type , int protocol
);
- family -- always set to AF_INET
type -- SOCK_STREAM, SOCK_DGRAM, or
SOCK_RAW
protocol -- set to zero (let the system
decide)
returns -- socket number allocated (zero is a
legal socket number)
- int connect ( int socket , struct
sockaddr * server , int addrlen );
- socket -- socket number from socket()
call
server -- struct sockaddr_in type. Must
be cast in call. Contains the address of the server to connect to.
addrlen -- length of structure
returns -- zero on success