MODLANG-21: Add socket module for spidermonkey from Jonas Gauffin

methods: connect, close, send, readBytes, read.

Note! It's completely untested.

usage:
var socket = new Socket();
socket.connect("hostname", 1234");
var line = socket.read();
socket.send("this is something\n");

The read method takes a delimiter and do not return until the
delimiter have been received (or the connection have been dropped).
The default delimiter is "\n".
The readBytes method reads the number of specified bytes.

only a TCP socket implementation. 





git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5701 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris committed 2007-09-11 23:29:50 +00:00
1 parent 6f0c169c7d
commit 815f34fbfb
3 files changed
+563

No files matched your search

@@ -0,0 +1,4 @@
switch_srcdir=../../../..
include ../mod_spidermonkey/sm.mak