prepped for release

This commit is contained in:
Brandon Nozaki Miller 2015-08-22 23:51:04 -07:00
parent f0068bbdc4
commit 0659d08fc3
3 changed files with 53 additions and 39 deletions

View File

@ -81,7 +81,7 @@ Set these variables in the ``ipc.config`` scope to overwrite or set default valu
| id | the id of this socket or service |
| networkHost| the local or remote host on which TCP, TLS or UDP Sockets should connect |
| networkPort| the default port on which TCP, TLS, or UDP sockets should connect |
| encoding | the default encoding for data sent on sockets |
| encoding | the default encoding for data sent on sockets. Mostly used if rawBuffer is set to true. Valid values are : ` ascii` ` utf8 ` ` utf16le` ` ucs2` ` base64` ` hex ` .
| rawBuffer| if true, data will be sent and recieved as a raw node ` Buffer ` __NOT__ an ` Object ` as JSON. |
| silent | turn on/off logging default is false which means logging is on |
| maxConnections| this is the max number of connections allowed to a socket. It is currently only being set on Unix Sockets. Other Socket types are using the system defaults. |
@ -477,3 +477,54 @@ This is the most basic example which will work for both local Unix Sockets and l
ipc.server.define.listen.message='This event type listens for message strings as value of data key.';
ipc.server.start();
#### Binary or Buffer Sockets
Binary or Buffer sockets can be used with any of the above socket types, however the way data events are emit is ***slightly*** different.
When setting up a rawBuffer socket you must specify it as such :
ipc.config.rawBuffer=true;
You can also specify its encoding type. The default is ` utf8 `
ipc.config.encoding='utf8';
emit string buffer :
//server
ipc.server.emit(
socket,
'hello'
);
//client
ipc.of.world.emit(
'hello'
)
emit byte array buffer :
//server
ipc.server.emit(
socket,
[10,20,30]
);
//client
ipc.server.emit(
[10,20,30]
);
emit hex array buffer :
//server
ipc.server.emit(
socket,
[0x05,0x6d,0x5c]
);
//client
ipc.server.emit(
[0x05,0x6d,0x5c]
);

View File

@ -1,6 +1,6 @@
{
"name": "node-ipc",
"version": "1.3.0",
"version": "2.0.0",
"description": "A nodejs module for local and remote Inter Process Communication (IPC), Neural Networking, and able to facilitate machine learning.",
"main": "node-ipc.js",
"directories": {

View File

@ -1,37 +0,0 @@
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/home/bmiller/.nvm/v0.10.30/bin/npm', 'publish' ]
2 info using npm@1.4.23
3 info using node@v0.10.30
4 verbose publish [ '.' ]
5 verbose cache add [ '.', null ]
6 verbose cache add name=undefined spec="." args=[".",null]
7 verbose parsed url { protocol: null,
7 verbose parsed url slashes: null,
7 verbose parsed url auth: null,
7 verbose parsed url host: null,
7 verbose parsed url port: null,
7 verbose parsed url hostname: null,
7 verbose parsed url hash: null,
7 verbose parsed url search: null,
7 verbose parsed url query: null,
7 verbose parsed url pathname: '.',
7 verbose parsed url path: '.',
7 verbose parsed url href: '.' }
8 silly lockFile 3a52ce78- .
9 verbose lock . /home/bmiller/.npm/3a52ce78-.lock
10 silly lockFile 3a52ce78- .
11 silly lockFile 3a52ce78- .
12 error addLocal Could not install .
13 error Error: ENOENT, open 'package.json'
14 error If you need help, you may report this *entire* log,
14 error including the npm and node versions, at:
14 error <http://github.com/npm/npm/issues>
15 error System Linux 3.13.0-34-generic
16 error command "node" "/home/bmiller/.nvm/v0.10.30/bin/npm" "publish"
17 error cwd /home/bmiller/git/node-ipc/testHarness
18 error node -v v0.10.30
19 error npm -v 1.4.23
20 error path package.json
21 error code ENOENT
22 error errno 34
23 verbose exit [ 34, true ]