Sockets: Difference between revisions

m
(Unicon)
Line 534:
host ||:= ":"
host ||:= 0 < 65536 > port | runerr(103,port)
return write(if s := open(host,"n") |then stop("Unable to connect to ",host,":",port), "hello socket world.") & close(s){
write(s, "hello socket world.")
close(s)
}
else stop("Unable to connect to ",host,":",port)
return
end</lang>
 
Anonymous user