jorts/examples/sockets.jt
2019-03-08 18:45:33 -03:00

10 lines
183 B
Text

import socket
import io
fn main () {
sock := socket.tcp_connect("example.com", 80)
sock.send("HTTP/1.1\n")
frame := sock.recv(1024)
sock.close()
io.puts(frame)
}