Networking examples - Factor Documentation (original) (raw)
Send some bytes to a remote host:
USING: io io.encodings.ascii io.sockets strings ; "myhost" 1033 ascii [ B{ 12 17 102 } write ] with-client
Look up the IP addresses associated with a host name:
USING: io.sockets ; "www.apple.com" 80 resolve-host .