{"name":"Node-ipc","tagline":"Inter Process Communication Module for node supporting Unix sockets, TCP, TLS, and UDP. Giving lightning speed on Linux, Mac, and Windows. Neural Networking in Node.JS","body":"#node-ipc\r\n*a nodejs module for local and remote Inter Process Communication* for Linux, Mac and Windows. \r\nA great solution for **Neural Networking** in Node.JS\r\n\r\n**npm install node-ipc** \r\n[![alt node-ipc npm details](https://nodei.co/npm/node-ipc.png?stars=true \"node-ipc npm module details \")](https://npmjs.org/package/node-ipc \"node-ipc details from npm\")\r\n\r\nPackage details websites :\r\n* [GitHub.io site](http://riaevangelist.github.io/node-ipc/ \"node-ipc documentation\"). A prettier version of this site.\r\n* [NPM Module](https://www.npmjs.org/package/node-ipc \"node-ipc npm module\"). The npm page for the node-ipc module.\r\n\r\n\r\n\r\n----\r\n#### Types of IPC Sockets\r\n\r\n| Type | Stability |Definition |\r\n|-----------|-----------|-----------|\r\n|Unix Socket| Stable | Gives Linux and Mac lightning fast communication and avoids the network card to reduce overhead and latency. [Local Unix Socket examples ](https://github.com/RIAEvangelist/node-ipc/tree/master/example/unixSocket/ \"Unix Socket Node IPC examples\") |\r\n|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 do not. [Local or remote network TCP Socket examples ](https://github.com/RIAEvangelist/node-ipc/tree/master/example/TCPSocket/ \"TCP Socket Node IPC examples\") |\r\n|TLS Socket | Alpha | ***coming soon...*** |\r\n|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 Implementation because UDP sockets go through the network card while Unix Sockets do not. [Local or remote network UDP Socket examples ](https://github.com/RIAEvangelist/node-ipc/tree/master/example/UDPSocket/ \"UDP Socket Node IPC examples\")|\r\n\r\n|OS|SupportedSockets|\r\n|-----|--------------------|\r\n|Linux|Unix,TCP,TLS,UDP|\r\n|Mac|Unix,TCP,TLS,UDP|\r\n|Win|TCP,TLS,UDP|\r\n\r\n**Windows**usersmaywanttouseUDPserversforthefastestlocalIPC.UnixServersarethefastestopriononLinuxandMac,butnotavailableforwindows.\r\n\r\n----\r\n\r\n``ipc.config``\r\n\r\nSetthesevariablesinthe``ipc.config``scopetooverwriteorsetdefaultvalues.\r\n\r\n{\r\nappspace:'app.',\r\nsocketRoot:'/tmp/',\r\nid:os.hostname(),\r\nnetworkHost:'localhost',\r\nnetworkPort:8000,\r\nencoding:'utf8',\r\nsilent:false,\r\nmaxConnections:100,\r\nretry:500,\r\nstopRetrying:false\r\n}\r\n\r\n\r\n|variable|documentation|\r\n|----------|---------------|\r\n|appspace|usedforUnixSocket(UnixDomainSocket)namespacing.Ifnotsetspecifically,theUnixDomainSocketwillcombinethesocketRoot,appspace,andidtoformtheUnixSocketPathforcreationorbinding.Thisisavailableincaseyouhavemanyappsrunningonyoursystem,youmayhaveseveralsocketswiththesameid,butifyouchangetheappspace,youwillstillhaveappspecicuniquesockets.|\r\n|socketRoot|thedirectoryinwhichtocreateorbindtoaUnixSocket|\r\n|id|theidofthissocketorservice|\r\n|networkHost|thelocalorremotehostonwhichTCP,TLSorUDPSocketsshouldconnect|\r\n|networkPort|thedefaultportonwhichTCP,TLS,orUDPsocketsshouldconnect|\r\n|encoding|thedefaultencodingfordatasentonsockets|\r\n|silent|turnon/offlogging