/ Socket

The Socket extension provides access to TCP and UDP sockets, both client and server.

Following is a simple example. First we run a server:

var s = new Socket({server:true,onRecv:puts});
while (1) update();

and in another terminial, a client.

var s = new Socket({noAsync:true});
s.send('hello world\n');

For another socket example see sockdemo.jsi.

For more details see Reference