generated from Comet/Comet-C-External-Lib
minimal working version going
This commit is contained in:
16
test.comet
Normal file
16
test.comet
Normal file
@@ -0,0 +1,16 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user