generated from Comet/Comet-C-External-Lib
17 lines
314 B
Plaintext
17 lines
314 B
Plaintext
import socket
|
|
import io
|
|
|
|
func main() -> int {
|
|
socket.Socket s = new socket.Socket(socket.Family.INET, socket.Type.STREAM, 0)
|
|
|
|
io.println("Connecting...")
|
|
s.connect("127.0.0.1", 2000)
|
|
|
|
io.println("Sending data...")
|
|
s.send("hi!")
|
|
|
|
io.println("Closing socket...")
|
|
s.close()
|
|
|
|
return 0
|
|
} |