When To Specify A Default Socket Address - HP Rp3440-4 - 9000 - 0 MB RAM Programmer's Manual

Bsd sockets interface programmer’s guide
Hide thumbs Also See for Rp3440-4 - 9000 - 0 MB RAM:
Table of Contents

Advertisement

Include files:
#include<sys/types.h>
#include<netinet/in.h>
#include<sys/socket.h>
System call:
connect(s,addr,addrlen)
int s;
struct sockaddr*addr;
int addrlen;
Parameter
s
socket descriptor of local
socket
addr
pointer to the socket
address
addrlen
length of address
Function result: 0 if connect is successful, –1 if failure occurs.

When to Specify a Default Socket Address

The client or server process should specify a default socket address after
sockets are bound.
Chapter 5
Advanced Topics for Internet Datagram Sockets
Specifying a Default Socket Address
Description of
Contents
INPUT Value
socket descriptor of socket
requesting default peer
address
pointer to socket address
of the socket to be the
peer
length of address pointed
to by addr
113

Advertisement

Table of Contents
loading

Table of Contents