udp: add bind() and recv() test tool

This commit is contained in:
K. Lange 2021-09-09 20:17:04 +09:00
parent b96af51342
commit 548a6314ac
1 changed files with 12 additions and 0 deletions

12
apps/test-udp-recv.krk Normal file
View File

@ -0,0 +1,12 @@
#!/bin/kuroko
import socket
let s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
print("Binding to :1234")
s.bind(('0.0.0.0',1234))
print("Waiting.")
while True:
print(s.recv(1024))