# @achrinza/node-ipc
> **NOTE:** This is a maintenance fork of `node-ipc` This is intended for
> packages that directly or indirectly depend on `node-ipc` where maintainers
> need a drop-in replacement.
>
> See https://github.com/achrinza/node-ipc/issues/1 for more details.
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code_of_conduct.md)
[![Coverage Status](https://coveralls.io/repos/github/achrinza/node-ipc/badge.svg?branch=main)](https://coveralls.io/github/achrinza/node-ipc?branch=main)
_a nodejs module for local and remote Inter Process Communication_ with full support for Linux, Mac and Windows. It also supports all forms of socket communication from low level unix and windows sockets to UDP and secure TLS and TCP sockets.
A great solution for complex multiprocess **Neural Networking** in Node.JS
**npm install @achrinza/node-ipc**
#### Older versions of node
the latest versions of `@achrinza/node-ipc` may work with the --harmony flag. Officially though, we support node v4 and newer with es5 and es6
#### Testing
`npm test` will run the jasmine tests with istanbul for @achrinza/node-ipc and generate a coverage report in the spec folder.
You may want to install jasmine and istanbul globally with `sudo npm install -g jasmine istanbul`
---
#### Contents
1. [Types of IPC Sockets and Supporting OS](#types-of-ipc-sockets)
1. [IPC Config](#ipc-config)
1. [IPC Methods](#ipc-methods)
1. [log](#log)
2. [connectTo](#connectto)
3. [connectToNet](#connecttonet)
4. [disconnect](#disconnect)
5. [serve](#serve)
6. [serveNet](#servenet)
1. [IPC Stores and Default Variables](#ipc-stores-and-default-variables)
1. [IPC Events](#ipc-events)
1. [Multiple IPC instances](#multiple-ipc-instances)
1. [Basic Examples](#basic-examples)
1. [Server for Unix||Windows Sockets & TCP Sockets](#server-for-unix-sockets-windows-sockets--tcp-sockets)
2. [Client for Unix||Windows Sockets & TCP Sockets](#client-for-unix-sockets--tcp-sockets)
3. [Server & Client for UDP Sockets](#server--client-for-udp-sockets)
4. [Raw Buffers, Real Time and / or Binary Sockets](#raw-buffer-or-binary-sockets)
1. [Working with TLS/SSL Socket Servers & Clients](https://github.com/RIAEvangelist/@achrinza/node-ipc/tree/master/example/TLSSocket)
1. [Node Code Examples](https://github.com/RIAEvangelist/@achrinza/node-ipc/tree/master/example)
---
#### Types of IPC Sockets
| Type | Stability | Definition |
| ----------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Unix Socket or Windows Socket | Stable | Gives Linux, Mac, and Windows lightning fast communication and avoids the network card to reduce overhead and latency. [Local Unix and Windows Socket examples ](https://github.com/RIAEvangelist/@achrinza/node-ipc/tree/master/example/unixWindowsSocket/ "Unix and Windows Socket Node IPC examples") |
| TCP Socket | Stable | Gives the most reliable communication across the network. Can be used for local IPC as well, but is slower than #1's Unix Socket Implementation because TCP sockets go through the network card while Unix Sockets and Windows Sockets do not. [Local or remote network TCP Socket examples ](https://github.com/RIAEvangelist/@achrinza/node-ipc/tree/master/example/TCPSocket/ "TCP Socket Node IPC examples") |
| TLS Socket | Stable | Configurable and secure network socket over SSL. Equivalent to https. [TLS/SSL documentation](https://github.com/RIAEvangelist/@achrinza/node-ipc/tree/master/example/TLSSocket) |
| UDP Sockets | Stable | Gives the **fastest network communication**. UDP is less reliable but much faster than TCP. It is best used for streaming non critical data like sound, video, or multiplayer game data as it can drop packets depending on network connectivity and other factors. UDP can be used for local IPC as well, but is slower than #1's Unix Socket or Windows Socket Implementation because UDP sockets go through the network card while Unix and Windows Sockets do not. [Local or remote network UDP Socket examples ](https://github.com/RIAEvangelist/@achrinza/node-ipc/tree/master/example/UDPSocket/ "UDP Socket Node IPC examples") |
| OS | Supported Sockets |
| ----- | -------------------------- |
| Linux | Unix, Posix, TCP, TLS, UDP |
| Mac | Unix, Posix, TCP, TLS, UDP |
| Win | Windows, TCP, TLS, UDP |
---
#### IPC Config
`ipc.config`
Set these variables in the `ipc.config` scope to overwrite or set default values.
```javascript
{
appspace : 'app.',
socketRoot : '/tmp/',
id : os.hostname(),
networkHost : 'localhost', //should resolve to 127.0.0.1 or ::1 see the table below related to this
networkPort : 8000,
readableAll : false,
writableAll : false,
encoding : 'utf8',
rawBuffer : false,
delimiter : '\f',
sync : false,
silent : false,
logInColor : true,
logDepth : 5,
logger : console.log,
maxConnections : 100,
retry : 500,
maxRetries : false,
stopRetrying : false,
unlink : true,
interfaces : {
localAddress: false,
localPort : false,
family : false,
hints : false,
lookup : false
}
}
```
| variable | documentation
没有合适的资源?快使用搜索试试~ 我知道了~
【快速解决】搭建VUE+VScode+elementUI开发环境,Vue环境配置
共2005个文件
md:2000个
ds_store:5个
需积分: 0 1 下载量 42 浏览量
2024-09-09
23:56:41
上传
评论
收藏 297.82MB RAR 举报
温馨提示
本次资源包括: node-v20.13.1-x64.msi:Node.js v20.13.1 版本的 Windows 安装包,支持64位系统,适用于开发和运行 JavaScript 应用程序。 nodeResp.zip:包含 Node.js 相关文档、示例代码和响应式开发模板,便于初学者快速入门。 pnpm:一个高效的包管理工具,替代 npm 和 yarn,具有更快的安装速度和更少的磁盘占用。 npm:Node.js 默认的包管理工具,用于安装、共享和管理 JavaScript 依赖。
资源推荐
资源详情
资源评论
收起资源包目录
【快速解决】搭建VUE+VScode+elementUI开发环境,Vue环境配置 (2005个子文件)
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
README.md 40KB
README.md 40KB
README.md 38KB
README.md 38KB
README.md 37KB
README.md 37KB
README.md 37KB
readme.md 33KB
readme.md 33KB
README.md 33KB
README.md 33KB
README.md 33KB
Readme.md 32KB
Readme.md 32KB
Readme.md 32KB
README.md 32KB
README.md 32KB
README.md 32KB
README.md 30KB
README.md 30KB
readme.md 30KB
readme.md 30KB
readme.md 30KB
README.md 28KB
README.md 28KB
README.md 27KB
README.md 27KB
README.md 27KB
Readme.md 27KB
README.md 26KB
README.md 26KB
README.md 25KB
README.md 25KB
README.md 25KB
README.md 25KB
README.md 25KB
README.md 25KB
README.md 25KB
README.md 24KB
README.md 24KB
README.md 24KB
README.md 24KB
README.md 24KB
README.md 24KB
README.md 24KB
README.md 23KB
README.md 23KB
README.md 23KB
README.md 22KB
README.md 22KB
README.md 22KB
README.md 22KB
README.md 22KB
README.md 21KB
README.md 21KB
README.md 21KB
README.md 21KB
README.md 21KB
README.md 21KB
README.md 21KB
README.md 21KB
README.md 20KB
README.md 20KB
README.md 20KB
README.md 20KB
README.md 20KB
README.md 20KB
readme.md 19KB
README.md 19KB
README.md 19KB
README.md 19KB
README.md 19KB
README.md 19KB
README.md 19KB
README.md 19KB
README.md 19KB
README.md 19KB
README.md 19KB
readme.md 19KB
readme.md 19KB
readme.md 19KB
README.md 19KB
README.md 18KB
README.md 18KB
readme.md 18KB
readme.md 18KB
README.md 18KB
README.md 18KB
README.md 18KB
README.md 18KB
README.md 18KB
README.md 18KB
README.md 17KB
README.md 17KB
README.md 17KB
共 2005 条
- 1
- 2
- 3
- 4
- 5
- 6
- 21
资源评论
命运之光
- 粉丝: 3w+
- 资源: 25
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于Java的浙江省财政票据管理电子票据业务定时Webservice设计源码
- 风光柴储并网 模糊控制进行能量管理 电压稳定在600v 风电,光伏,柴油机,储能都链接在dc直流母线侧,进行逆变并网 含文献
- 基于Java和Shell的Java最好用词云工具设计源码
- 基于C++的security_dataclassification模块设计源码
- 基于Python的手写文章模拟器设计源码
- 基于Java语言的农业主题农场管理系统设计源码
- 基于Elasticsearch和Python的图片相似度搜索系统设计源码
- 基于Java语言的Minecraft竞赛核心设计源码
- comsol光子晶体仿真 在平带上调控merging BIC,包含三维能带,Q因子计算,Q因子拟合 如需后面的远场偏振计算另加
- 基于Java的Webview自动化模拟用户行为设计源码
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功