1998 c socket programming tutorial share session 5958

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: a remote host - receive data from a socket descriptor - send data to a socket descriptor - “one-way” close of a socket descriptor SAS/C & C++ Compiler R&D Slide 19 Feb. 1998 C Socket Programming Tutorial SHARE Session 5958 Network Database Administration functions U U U U U U gethostbyname - given a hostname, returns a structure which specifies its DNS name(s) and IP address(es) getservbyname - given service name and protocol, returns a structure which specifies its name(s) and its port address gethostname - returns hostname of local host getservbyname, getservbyport, getservent getprotobyname, getprotobynumber, getprotobyent getnetbyname, getnetbyaddr, getnetent SAS Institute Inc. Institute Cary, NC SAS/C & C++ Compiler R&D Slide 20 Feb. 1998 C Socket Programming Tutorial SHARE Session 5958 Socket Utility Functions U U U U U ntohs/ntohl - convert short/long from network byte order (big endian) to host byte order htons/htonl - convert short/long from host byte order to network byte order inet_ntoa/inet_addr - convert 32-bit IP address (network byte order to/from a...
View Full Document

Ask a homework question - tutors are online