For this exercise a program is open a socket to localhost on port 256 and send the message "hello socket world" before closing the socket.

Catching any exceptions or errors is not required.




#!/usr/bin/env jsish
function sockets() {
    var sock = new Socket({client:true, port:256, noAsync:true, udp:true});
    sock.send(-1, 'hello socket world');
    sock.close();
}
 
;sockets();
 
/*
=!EXPECTSTART!=
sockets() ==> undefined
=!EXPECTEND!=
*/