]>
git.evergreen-ils.org Git - Evergreen.git/commit
internal: JSAN socket library
Leverages Mozilla's nsISocketTransportService, nsIScriptableInputStream, and
nsIInputStreamPump XPCOM, and the NetUtils javascript module.
Usage example:
Install netcat on a server and as root do: nc -l -p 5000
Then, in the staff client, load Admin -> For Developers -> Javascript Shell
Enter:
JSAN.use('util.socket');
var s = new util.socket('server hostname or IP address here', 5000);
s.write('hello\n');
On the server, reply with world<enter>
Back in the javascript shell, use
s.read();
This is geared to help with implementing future functionality, but shouldn't
result in any end-user visible changes by itself.
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>