New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

socket-ipc

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

socket-ipc

Message-based communications over UNIX sockets

latest
Source
npmnpm
Version
4.0.2
Version published
Weekly downloads
55
266.67%
Maintainers
1
Weekly downloads
 
Created
Source

Socket IPC

WebSocket-like communications over local UNIX sockets

Installation

$ npm install socket-ipc

Creating a Message Server

var ipc = require('socket-ipc')

var server = new ipc.MessageServer({ path: '/tmp/socket-loc' })

server.on('error', function(err) {
  console.error(err.stack)
})

server.on('message', function(message) {
  console.log('got message:', message.data)
  server.send('back at you: ' + message.data)
})

server.on('connection', function(connection) {
  console.log('client connected')
})

server.start()

Connecting To a Message Server

var ipc = require('socket-ipc')

var client = new ipc.MessageClient({ path: '/tmp/socket-loc' })

client.on('error', function(err) {
  console.error(err.stack)
})

client.on('connection', function(connection) {
  console.log('connected. sending greetings...')
  client.send('greetings')
})

client.on('message', function(message) {
  console.log('got message:', message.data)
})

client.start()

License

(The Apache 2.0 License)

Copyright (c) 2016 JCore Systems LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Keywords

UNIX

FAQs

Package last updated on 25 Jun 2022

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