Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Sockets/Unicon/sockets.unicon
Normal file
16
Task/Sockets/Unicon/sockets.unicon
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue