generated from Comet/Comet-C-External-Lib
clean up uneeded files
This commit is contained in:
16
client.comet
16
client.comet
@@ -1,16 +0,0 @@
|
||||
import socket
|
||||
import io
|
||||
|
||||
func main() -> int {
|
||||
socket.Socket s = new socket.Socket(socket.Family.INET, socket.Type.STREAM, 0)
|
||||
|
||||
s.connect("127.0.0.1", 2000)
|
||||
s.send("hi!")
|
||||
|
||||
small byte = s.readByte()
|
||||
io.println("%c", byte)
|
||||
|
||||
s.close()
|
||||
|
||||
return 0
|
||||
}
|
||||
21
server.comet
21
server.comet
@@ -1,21 +0,0 @@
|
||||
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.read(1024)
|
||||
io.println("Response: %s", response)
|
||||
|
||||
client.sendByte('a')
|
||||
|
||||
s.close()
|
||||
|
||||
return 0
|
||||
}
|
||||
Reference in New Issue
Block a user