some std wrappers around libc
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
func main[] : I64
|
||||
let s: I64 = net.listen(8000)
|
||||
|
||||
let resp: String = c.malloc(60000)
|
||||
let resp: String = mem.alloc(60000)
|
||||
while true
|
||||
let c: I64 = c.accept(s, 0, 0)
|
||||
if c < 0
|
||||
let conn: I64 = c.accept(s, 0, 0)
|
||||
if conn < 0
|
||||
continue
|
||||
|
||||
let n: I64 = c.read(c, resp, 60000)
|
||||
c.send(c, resp, n, 0)
|
||||
c.close(c)
|
||||
let n: I64 = c.read(conn, resp, 60000)
|
||||
c.send(conn, resp, n, 0)
|
||||
c.close(conn)
|
||||
Reference in New Issue
Block a user