Skip to content

Commit 5c0eaef

Browse files
author
James Sanders
committed
Update README
1 parent aef5120 commit 5c0eaef

File tree

1 file changed

+57
-1
lines changed

1 file changed

+57
-1
lines changed

README.md

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,62 @@
11
Node.js SNPP Server
22
==============
33

4-
An implementation of an SNPP server using Node.js.
4+
An SNPP (level 1) server library for Node.js.
55

66
[rq]: http://github.com/jsanders/node-snpp
7+
8+
=== Installation
9+
10+
Clone or otherwise download library and symlink or copy snpp.js into your ~/.node_libraries directory.
11+
12+
=== Usage
13+
14+
var snpp = require('snpp');
15+
snpp.createServer(function (request, response) {
16+
// Handle 'PAGE' command
17+
request.addListener('page', function () {
18+
// request.pager contains pager number
19+
});
20+
21+
// Handle 'MESS' command
22+
request.addListener('mess', function () {
23+
// request.pager contains pager number, request.message contains message
24+
});
25+
26+
// Handle 'SEND' command
27+
request.addListener('send', function () {
28+
// request.pager contains pager number, request.message contains message
29+
});
30+
31+
// Handle 'QUIT' command
32+
request.addListener('send', function () {
33+
// request.pager contains pager number, request.message contains message
34+
});
35+
}).lisen('444', 'localhost');
36+
37+
Examples can be found in the examples directory.
38+
39+
=== LICENSE
40+
41+
(The MIT License)
42+
43+
Copyright (c) 2009
44+
45+
Permission is hereby granted, free of charge, to any person obtaining
46+
a copy of this software and associated documentation files (the
47+
'Software'), to deal in the Software without restriction, including
48+
without limitation the rights to use, copy, modify, merge, publish,
49+
distribute, sublicense, and/or sell copies of the Software, and to
50+
permit persons to whom the Software is furnished to do so, subject to
51+
the following conditions:
52+
53+
The above copyright notice and this permission notice shall be
54+
included in all copies or substantial portions of the Software.
55+
56+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
57+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
58+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
59+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
60+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
61+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
62+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)