generated from Comet/Comet-C-External-Lib
16 lines
338 B
Plaintext
16 lines
338 B
Plaintext
import socket
|
|
import io
|
|
|
|
func main() -> int {
|
|
socket.Socket s = new socket.Socket(socket.Family.INET, socket.Type.STREAM, 0)
|
|
|
|
s.connect("142.250.188.46", 80)
|
|
s.send("GET / HTTP/1.1\r\nHost: google.com\r\n\r\n")
|
|
|
|
string response = s.recv(1024)
|
|
io.println("Response: %s", response)
|
|
|
|
s.close()
|
|
|
|
return 0
|
|
} |