Download Communication

Document related concepts

Wake-on-LAN wikipedia , lookup

TCP congestion control wikipedia , lookup

IEEE 1355 wikipedia , lookup

Dynamic Host Configuration Protocol wikipedia , lookup

AppleTalk wikipedia , lookup

Parallel port wikipedia , lookup

I²C wikipedia , lookup

Remote Desktop Services wikipedia , lookup

Lag wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Internet protocol suite wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Real-Time Messaging Protocol wikipedia , lookup

Transcript
Example (Stream Socket;
setting address)
setaddr(struct sockaddr_in *sp, char *host, int port)
{
struct hostent *hp;
hp = gethostbyname(host);
if (hp == NULL) {
fprintf(stderr, "%s: unknown host\n", host);
exit(1);
}
sp->sin_family = AF_INET;
bcopy(hp->h_addr, &sp->sin_addr, hp->h_length);
sp->sin_port = htons(port);
}