Closed skgbanga closed 6 years ago
import curio from curio import socket async def udp_echo(addr): sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.bind(addr) while True: data, addr = await sock.recvfrom(10000) print('Received from', addr, data) await sock.sendto(data, addr) if __name__ == '__main__': curio.run(main, ('', 26000))
Above should be curio.run(udp_echo, ('', 26000))
curio.run(udp_echo, ('', 26000))
Good catch! Fixed.
Above should be
curio.run(udp_echo, ('', 26000))