Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ipsee

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipsee

inter-process communication for node

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Ipsee

Build Status

Ipsee facilitates IPC (Inter Process Communication) in Node.js via UNIX sockets.

Getting Started

Install using NPM:

npm install ipsee --save

Give Ipsee a namespace for your application and subscribe:

var ipsee = require('ipsee');
var ipc   = ipsee('my_app_namespace').subscribe();

Now you can send and receive messages with your other processes and programs:

ipc.on('ping', function(data) {
  console.log('received ping from pid %d, sending pong...', data._fromUID);
  ipc.send('pong');
});

ipsee(namespace, [options])

Creates a new UNIX socket server and connects to other sockets in the given namespace.

Methods

i.subscribe([uid])

If a uid is supplied, then subscribe to the socket server referenced, otherwise subscribe to all in the namespace.

i.send(event, [data])

Broadcast an event to other connected sockets containing optional data.

i.close()

End connections with all sockets and unlink the underlying file descriptor.

Options

The ipsee() function's second argument is an optional options dictionary.

path

Directory path where UNIX socket file descriptor should be created. Default: /tmp.

debug

Print verbose debug messages to the console. Default: false.

uid

Unique identifier other ipsee instances use to refer to this one. Default: process.pid.

Events

Aside from your custom event listeners, there are a few built in events.

ready

Emitted when this socket server is listening on the newly minted file descriptor.

close

Emitted when this socket server has been closed and the underlying file descriptor unlinked.

error

Emitted when something unexpected happens. Failure to handle this event will result in a throw.

Keywords

FAQs

Package last updated on 26 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc