udp: add bind() and recv() test tool
This commit is contained in:
parent
b96af51342
commit
548a6314ac
12
apps/test-udp-recv.krk
Normal file
12
apps/test-udp-recv.krk
Normal 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))
|
Loading…
Reference in New Issue
Block a user