procbridge
procbridge copied to clipboard
Unix Domain socket support
Hi. By any change is unix domain socket support in the plans? Sometime we just need IPC between process running in the same machine
@rjborba Just updated procbridge-python (==1.2.0) and procbridge-nodejs (==1.1.0). They support unix domain socket. Documentation will be added later.
For python:
import procbridge as pb
# inet socket:
server = pb.Server('0.0.0.0', PORT, delegate)
client = pb.Client('127.0.0.1', 8000)
# unix domain socket:
server = pb.Server.from_unix('/path/to/my/sock', delegate)
client = pb.Client.from_unix('/path/to/my/sock')
For Node.js:
const { Server, Client } = require('procbridge')
# inet socket:
const server = new Server('0.0.0.0', 8000, delegate)
const client = new Client('127.0.0.1', 8000)
# unix domain socket:
const server = new Server('/path/to/my/sock', delegate)
const client = new Client('/path/to/my/sock')