Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unix Domain socket support #14

Open
rjborba opened this issue Aug 19, 2019 · 1 comment
Open

Unix Domain socket support #14

rjborba opened this issue Aug 19, 2019 · 1 comment

Comments

@rjborba
Copy link

rjborba commented Aug 19, 2019

Hi. By any change is unix domain socket support in the plans? Sometime we just need IPC between process running in the same machine

@gongzhang
Copy link
Owner

@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')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants