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.




val txt = Word8VectorSlice.full (Byte.stringToBytes  "hello world"   ) ;
val set = fn socket => fn ipnr => fn portnr => fn text =>
 (
  Socket.connect (socket, INetSock.toAddr ( Option.valOf (NetHostDB.fromString(ipnr) ) , portnr )) ;
  Socket.sendVec(socket, text)  before Socket.close socket 
 )
;
 