Socket
Socket
Sign inDemoInstall

node-ipc

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-ipc - npm Package Compare versions

Comparing version 1.1.13 to 1.2.0

4

node-ipc.js

@@ -24,3 +24,3 @@ var os = require('os'),

socketRoot : '/tmp/',
networkHost : 'localhost',
networkHost : '127.0.0.1',
networkPort : 8000,

@@ -299,2 +299,2 @@ id : os.hostname(),

module.exports=ipc;
module.exports=ipc;
{
"name": "node-ipc",
"version": "1.1.13",
"version": "1.2.0",
"description": "A nodejs module for local and remote Inter Process Communication (IPC), Neural Networking, and able to facilitate machine learning.",

@@ -5,0 +5,0 @@ "main": "node-ipc.js",

@@ -10,2 +10,3 @@ node-ipc

[![NPM Download Graph for node-ipc](https://nodei.co/npm-dl/node-ipc.png?months=6&height=3)](https://npmjs.org/package/node-ipc)
[![node-ipc package quality](http://npm.packagequality.com/badge/node-ipc.png)](http://packagequality.com/#?package=node-ipc)

@@ -53,3 +54,3 @@ Package details websites :

**Windows** users may want to use UDP servers for the fastest local IPC. Unix Servers are the fastest oprion on Linux and Mac, but not available for windows.
**Windows** users may want to use UDP servers for the fastest local IPC. Unix Servers are the fastest option on Linux and Mac, but not available for Windows.

@@ -89,3 +90,3 @@ ----

| maxRetries | if set, it represents the maximum number of retries after each disconnect before giving up and completely killing a specific connection |
| stopRetrying| Defaults to false mwaning clients will continue to retryt to connect to servers indefinately at the retry interval. If set to any number the client will stop retrying when that number is exceeded after each disconnect. If set to 0, the client will ***NOT*** try to reconnect. |
| stopRetrying| Defaults to false meaning clients will continue to retry to connect to servers indefinitely at the retry interval. If set to any number the client will stop retrying when that number is exceeded after each disconnect. If set to 0, the client will ***NOT*** try to reconnect. |

@@ -102,5 +103,5 @@ ----

ipc.log will accept any number of arguments and if ``ipc.config.silent`` is not set, it will concat them all with a sincle space ' ' between them and then log them to the console. This is fast because it prevents any concation from happening if the ipc is set to silent. That way if you leave your logging in place it should not effect performance.
ipc.log will accept any number of arguments and if ``ipc.config.silent`` is not set, it will concat them all with a sincle space ' ' between them and then log them to the console. This is fast because it prevents any concatenation from happening if the ipc is set to silent. That way if you leave your logging in place it should not effect performance.
the log also supports [colors](https://github.com/Marak/colors.js) implementation. All of the available styles are supported and the theme styles are as follows :
The log also supports [colors](https://github.com/Marak/colors.js) implementation. All of the available styles are supported and the theme styles are as follows :

@@ -138,6 +139,6 @@ {

| id | required | is the string id of the socket being connected to. The socket with this id is added to the ipc.of object when created. |
| path | optional | is the path of the Unix Domain Socket File, if not set this will be defaylted to ``ipc.config.socketRoot``+``ipc.config.appspace``+``id`` |
| path | optional | is the path of the Unix Domain Socket File, if not set this will default to ``ipc.config.socketRoot``+``ipc.config.appspace``+``id`` |
| callback | optional | this is the function to execute when the socket has been created. |
**examples** arguments can be ommitted solong as they are still in order.
**examples** arguments can be ommitted so long as they are still in order.

@@ -182,7 +183,7 @@ ipc.connectTo('world');

Used to connect as a client to a TCP or TLS socket via the network card. This can be local or remote, if local, it is recommended that you use the Unix Socket Implementaion of ``connectTo`` instead as it is much faster since it avoids the network card alltogether.
Used to connect as a client to a TCP or TLS socket via the network card. This can be local or remote, if local, it is recommended that you use the Unix Socket Implementaion of ``connectTo`` instead as it is much faster since it avoids the network card altogether.
| variable | required | definition |
|----------|----------|------------|
| id | required | is the string id of the socket being connected to. For TCP & TLS sockets, this id is added to the ``ipc.of`` object when the socket is created with a refrence to the socket. |
| id | required | is the string id of the socket being connected to. For TCP & TLS sockets, this id is added to the ``ipc.of`` object when the socket is created with a reference to the socket. |
| host | optional | is the host on which the TCP or TLS socket resides. This will default to ``ipc.config.networkHost`` if not specified. |

@@ -192,3 +193,3 @@ | port | optional | the port on which the TCP or TLS socket resides. |

**examples** arguments can be ommitted solong as they are still in order.
**examples** arguments can be ommitted so long as they are still in order.
So while the default is : (id,host,port,callback), the following examples will still work because they are still in order (id,port,callback) or (id,host,callback) or (id,port) etc.

@@ -251,3 +252,3 @@

***examples*** arguments can be ommitted solong as they are still in order.
***examples*** arguments can be ommitted so long as they are still in order.

@@ -363,2 +364,3 @@ ipc.serve();

ipc.server.emit(
socket,
'message',

@@ -377,3 +379,3 @@ data+' world!'

var ipc=require('../../../node-ipc');
var ipc=require('node-ipc');

@@ -414,3 +416,3 @@ ipc.config.id = 'hello';

This means a UDP Client and Server are the same thing because inorder to recieve data, a UDP Socket must have its own port to recieve data on, and only one process can use this port at a time. It also means that inorder to ``emit`` or ``broadcast`` data the UDP server will need to know the host and port of the Socket it intends to broadcast the data to.
This means a UDP Client and Server are the same thing because in order to recieve data, a UDP Socket must have its own port to recieve data on, and only one process can use this port at a time. It also means that inorder to ``emit`` or ``broadcast`` data the UDP server will need to know the host and port of the Socket it intends to broadcast the data to.

@@ -417,0 +419,0 @@ This is the most basic example which will work for both local Unix Sockets and local or remote network TCP Sockets.

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