Sockets: Difference between revisions

494 bytes removed ,  14 years ago
m
Unicon/Icon consistency 2
m (omit reason)
m (Unicon/Icon consistency 2)
Line 523:
#! The actual server
[ " hello socket world" server.send ] 256 server.start</lang>
 
=={{header|Unicon}}==
Unicon integrated TCP/IP networking and messaging.
<lang unicon>procedure main(arglist) #: usage socket port hostname or socket port
hello(arglist[2]|"",arglist[1])
end
 
procedure hello(host,port)
local s
/host := ""
host ||:= ":"
host ||:= 0 < 65536 > port | runerr(103,port)
if s := open(host,"n") then {
write(s, "hello socket world.")
close(s)
}
else stop("Unable to connect to ",host,":",port)
return
end</lang>
 
=={{header|UnixPipes}}==
Anonymous user