Jump to content

Sockets: Difference between revisions

456 bytes added ,  14 years ago
Unicon
m (→‎{{header|Purebasic}}: Capitalization error)
(Unicon)
Line 522:
#! 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)
return write( s := open(host,"n") | stop("Unable to connect to ",host,":",port), "hello socket world.") & close(s)
end</lang>
 
=={{header|UnixPipes}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.