Skip to content

Files

Latest commit

87376f4 · Jan 9, 2021

History

History

unix_socket

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jan 9, 2021
Dec 28, 2020

UNIX Socket Example

Routes CloudEvents from an input UNIX Socket port to an output UNIX Socket port.

Requirements

  • openbsd-netcat, command nc
    • arch linux: install it from the arch repository with yaourt -S openbsd-netcat
    • mac: install it with homebrew brew install netcat

Run

  1. run cargo run --bin unix_socket
  2. listen to the outgoing socket nc -U ./cloud-events-out
  3. connect to the incoming socket nc -U ./cloud-events-in
  4. send a CloudEvents over the cloud-events-in socket, e.g. {"type":"test type","specversion":"1.0","source":"http://www.google.com","id":"id","contenttype":"application/json","data":"test"}