sort std
This commit is contained in:
@@ -5,7 +5,7 @@ func main[] : i64
|
||||
|
||||
io.println("Listening on port 8000...")
|
||||
|
||||
resp := mem.alloc(60000)
|
||||
resp := mem.alloc(IP_MAXPACKET)
|
||||
addr := _stackalloc(16)
|
||||
while true
|
||||
conn := net.accept(s, addr)
|
||||
@@ -14,7 +14,7 @@ func main[] : i64
|
||||
|
||||
io.printf("%d.%d.%d.%d:%d\n", addr[4], addr[5], addr[6], addr[7], mem.read16be(addr + 2))
|
||||
|
||||
n := net.read(conn, resp, 60000)
|
||||
n := net.read(conn, resp, IP_MAXPACKET)
|
||||
|
||||
io.print_sized(resp, n)
|
||||
io.println("")
|
||||
|
||||
@@ -5,7 +5,7 @@ func main[] : i64
|
||||
|
||||
io.println("Listening on port 8000...")
|
||||
while true
|
||||
pkt := net.udp_receive(s, 60000)
|
||||
pkt := s->receive(IP_MAXPACKET)
|
||||
if pkt->size <= 0
|
||||
pkt->free()
|
||||
continue
|
||||
@@ -15,5 +15,5 @@ func main[] : i64
|
||||
io.print_sized(pkt->data, pkt->size)
|
||||
io.println("")
|
||||
|
||||
net.udp_send_to(s, pkt->source_addr, pkt->data, pkt->size)
|
||||
s->send_to(pkt->source_addr, pkt->data, pkt->size)
|
||||
pkt->free()
|
||||
|
||||
Reference in New Issue
Block a user