Getting Started with Sockets in the Internet Domain
This section provides some basic information for getting started with sockets
in the internet domain:
- Use the socket() call to create a socket in the internet
domain specifying PF_INET for the domain parameter.
- Use AF_INET for the address family.
- The following socket types are supported for the internet
domain:
- Datagram (SOCK_DGRAM)
- Raw (SOCK_RAW)
- Stream (SOCK_STREAM)
The
socket type is passed as a parameter to the socket() call. For additional
information, see Socket Types and
general socket programming concepts in Sockets
General Programming Information.
Datagram
sockets use the UDP protocol, stream sockets use the TCP protocol, and raw
sockets can use the raw, ICMP, or IGMP protocols.
[Back: Internet Group Management Protocol (IGMP)]
[Next: Network-Byte Order]