Skip to content

Instantly share code, notes, and snippets.

@Risto-Stevcev
Created May 27, 2023 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Risto-Stevcev/de35c93c14a9e5e65450772d20b0d1b0 to your computer and use it in GitHub Desktop.
Save Risto-Stevcev/de35c93c14a9e5e65450772d20b0d1b0 to your computer and use it in GitHub Desktop.
unix-socket-simple-ipc

Unix socket simple IPC example

Install

xbps-install -S openbsd-netcat

Server

In a terminal:

nc -lkU aSocket.sock

Client

In a seperate terminal:

nc -U ./aSocket.sock

Now write to any of the terminals and watch the other one update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment