core client and server methods implemented

This commit is contained in:
2026-07-10 08:55:06 +10:00
parent 36b2e37bda
commit 0a51c54040
6 changed files with 145 additions and 12 deletions

19
server.comet Normal file
View File

@@ -0,0 +1,19 @@
import socket
import io
func main() -> int {
socket.Socket s = new socket.Socket(socket.Family.INET, socket.Type.STREAM, 0)
s.bind("127.0.0.1", 2000)
s.listen(10)
socket.Socket client = s.accept()
io.println("Connection received!")
string response = client.recv(256)
io.println("Response: %s", response)
s.close()
return 0
}