{"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\nThis work is licenced via the [DBAD Public Licence](http://www.dbad-license.org/). \r\n\r\n----\r\n#### Contents\r\n\r\n1. [Types of IPC Sockets and Supporting OS](#types-of-ipc-sockets)\r\n2. [IPC Methods](#ipc-methods)\r\n 1. [log](#log)\r\n 2. [connectTo](#connectto)\r\n 3. [connectToNet](#connecttonet)\r\n 4. [disconnect](#disconnect)\r\n 5. [serve](#serve)\r\n 6. [serveNet](#servenet)\r\n3. [IPC Stores and Default Variables](#ipc-stores-and-default-variables)\r\n4. [Basic Examples](#basic-examples)\r\n 1. [Server for Unix Sockets & TCP Sockets](#server-for-unix-sockets--tcp-sockets)\r\n 2. [Client for Unix Sockets & TCP Sockets](#client-for-unix-sockets--tcp-sockets)\r\n 3. [Server & Client for UDP Sockets](#server--client-for-udp-sockets)\r\n5. [Advanced Examples](https://github.com/RIAEvangelist/node-ipc/tree/master/example)\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\nmaxRetries:false,\r\nstopRetrying