all socket methods implemented

This commit is contained in:
2026-07-10 11:41:35 +10:00
parent 0a51c54040
commit 5f78bf745a
5 changed files with 291 additions and 10 deletions

View File

@@ -4,13 +4,12 @@ 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...")
small byte = s.readByte()
io.println("%c", byte)
s.close()
return 0