Merge branch 'master' of https://github.com/RIAEvangelist/node-ipc into brandon
This commit is contained in:
commit
c85467b628
1 changed files with 24 additions and 18 deletions
42
README.md
42
README.md
|
@ -10,6 +10,24 @@ Package details websites :
|
||||||
* [NPM Module](https://www.npmjs.org/package/node-ipc "node-ipc npm module"). The npm page for the node-ipc module.
|
* [NPM Module](https://www.npmjs.org/package/node-ipc "node-ipc npm module"). The npm page for the node-ipc module.
|
||||||
|
|
||||||
|
|
||||||
|
----
|
||||||
|
#### Contents
|
||||||
|
|
||||||
|
1. [Types of IPC Sockets and Supporting OS](#types-of-ipc-sockets)
|
||||||
|
2. [IPC Methods](#ipc-methods)
|
||||||
|
1. [log](#log)
|
||||||
|
2. [connectTo](#connectto)
|
||||||
|
3. [connectToNet](#connecttonet)
|
||||||
|
4. [disconnect](#disconnect)
|
||||||
|
5. [serve](#serve)
|
||||||
|
6. [serveNet](#servenet)
|
||||||
|
3. [IPC Stores and Default Variables](#ipc-stores-and-default-variables)
|
||||||
|
4. [Basic Examples](#basic-examples)
|
||||||
|
1. [Server for Unix Sockets & TCP Sockets](#server-for-unix-sockets--tcp-sockets)
|
||||||
|
2. [Client for Unix Sockets & TCP Sockets](#client-for-unix-sockets--tcp-sockets)
|
||||||
|
3. [Server & Client for UDP Sockets](#server--client-for-udp-sockets)
|
||||||
|
5. [Advanced Examples](https://github.com/RIAEvangelist/node-ipc/tree/master/example)
|
||||||
|
|
||||||
|
|
||||||
----
|
----
|
||||||
#### Types of IPC Sockets
|
#### Types of IPC Sockets
|
||||||
|
@ -304,26 +322,14 @@ or specifying everything UDP
|
||||||
----
|
----
|
||||||
### IPC Stores and Default Variables
|
### IPC Stores and Default Variables
|
||||||
|
|
||||||
``ipc.of``
|
| variable | definition |
|
||||||
|
|-----------|------------|
|
||||||
This is where socket connection refrences will be stored when connecting to them as a client via the ``ipc.connectTo`` or ``iupc.connectToNet``.
|
| ipc.of | This is where socket connection refrences will be stored when connecting to them as a client via the ``ipc.connectTo`` or ``iupc.connectToNet``. They will be stored based on the ID used to create them, eg : ipc.of.mySocket|
|
||||||
|
| ipc.server| This is a refrence to the server created by ``ipc.serve`` or ``ipc.serveNet``|
|
||||||
***example***
|
|
||||||
|
|
||||||
ipc.connectTo(
|
|
||||||
'world',
|
|
||||||
function(){
|
|
||||||
|
|
||||||
ipc.of.world.on(
|
|
||||||
'message',
|
|
||||||
function(data){...}
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
----
|
----
|
||||||
### Basic Examples
|
### Basic Examples
|
||||||
|
You can find [Advanced Examples](https://github.com/RIAEvangelist/node-ipc/tree/master/example) in the examples folder. In the examples you will find more complex demos including multi client examples.
|
||||||
|
|
||||||
#### Server for Unix Sockets & TCP Sockets
|
#### Server for Unix Sockets & TCP Sockets
|
||||||
The server is the process keeping a socket for IPC open. Multiple sockets can connect to this server and talk to it. It can also broadcast to all clients or emit to a specific client. This is the most basic example which will work for both local Unix Sockets and local or remote network TCP Sockets.
|
The server is the process keeping a socket for IPC open. Multiple sockets can connect to this server and talk to it. It can also broadcast to all clients or emit to a specific client. This is the most basic example which will work for both local Unix Sockets and local or remote network TCP Sockets.
|
||||||
|
|
Loading…
Reference in a new issue