# Creating sockets

DevFeed: [Creating sockets](<https://devfeed.tech/articles/creating-sockets-38989.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2019-11-06-creating-sockets>)

Author: Marek

Published: 2019-11-05T23:00:00Z

Content type: tutorial

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [Linux](<https://devfeed.tech/topics/linux.md>), [networking](<https://devfeed.tech/topics/networking.md>), [API](<https://devfeed.tech/topics/api.md>), [Unix](<https://devfeed.tech/topics/unix.md>), [Internet](<https://devfeed.tech/topics/internet.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [domain](<https://devfeed.tech/tags/domain.md>), [ipv4](<https://devfeed.tech/tags/ipv4.md>), [ipv6](<https://devfeed.tech/tags/ipv6.md>), [linux](<https://devfeed.tech/tags/linux.md>), [networking](<https://devfeed.tech/tags/networking.md>), [tcp](<https://devfeed.tech/tags/tcp.md>), [udp](<https://devfeed.tech/tags/udp.md>), [unix](<https://devfeed.tech/tags/unix.md>)

## AI overview

A tutorial on creating sockets on Linux. It explains the socket syscall's domain, type, and protocol arguments, then introduces IPv4, IPv6, and Unix sockets, including when AF_UNIX is appropriate for communication between processes on the same host.

## Source excerpt

Creating sockets Articles from this series: - Creating sockets on Linux. - Addressing of AF_INET, AF_INET6 and AF_UNIX sockets. Our journey into the Linux networking API starts with the common syscall: It takes three arguments: - domain specifies an address family. Most commonly used are IPv4, IPv6 and Unix sockets - AF_INET, AF_INET6 and AF_UNIX families. Linux supports more families, notably AF_PACKET, AF_NETLINK, AF_ALG and AF_VSOCK are sometimes handy.