GithubHelp home page GithubHelp logo

isabella232 / node-zsock Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tritondatacenter/node-zsock

0.0 0.0 0.0 63 KB

Library for creating Unix Domain Sockets in Solaris Zones

License: MIT License

JavaScript 3.73% Python 87.65% C++ 8.62%

node-zsock's Introduction

node-zsock is a very small library specific to Sun derived operating systems (i.e., illumos). This library allows a node server running in the Global Zone to open Unix Domain Sockets in other zones, safely, under the same FS path in each zone. By using this mechanism, you can enable IPC across zones.

Usage

The library is very simple, and small, and only exposes you the ability to create a new fd socket that can be used with the existing node net API:

var zsock = require('zsock');
zsock.createZoneSocket({
  zone: 'foo',
  path: '/tmp/sock'
}, function(err, fd) {
  if (err) throw err;

  var server = net.createServer(function(c) {
    c.write('hello from the global zone...\r\n');
    c.pipe(c);
  });

  server.listenFD(fd);
});

Note that this API creates a STREAM socket (i.e., there's no datagram support). But that seems to be the general case in node anyway.

Installation

npm install zsock

(You can also install it by doing node-waf configure build and then linking or copying the folder into your project's node_modules directory.)

License

MIT. 'Nuff said.

Bugs

See https://github.com/mcavage/node-zsock/issues.

node-zsock's People

Contributors

mcavage avatar trentm avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.