sajad torkamani

In a nutshell

A Unix domain socket is an endpoint for communication between processes running on the same machine. Each Unix domain socket is identified using a file system path (similar to regular files).

Create a socket

You can create a socket using the socket() system call. This will return a file descriptor.

Connecting to a socket

You can use the connect() system call to establish a connection to another process that’s listening on the same socket using the bind() and listen() system calls.

Sending messages via sockets

Once two processes have established a socket connection, they can data through the socket using the send() and recv() system calls.

View Unix domain sockets

See this post.

Other notes

  • All read and write operations on a Unix socket is done in memory.

Leave a comment

Your email address will not be published. Required fields are marked *