add echo route

This commit is contained in:
Morgan 'ARR\!' Allen 2023-10-19 11:51:06 -07:00
parent e14a063a28
commit fc5a5e1cc1

6
app.py
View file

@ -69,3 +69,9 @@ def route_ticker(sock):
sock.send(tick); sock.send(tick);
tick = tick + 1 tick = tick + 1
time.sleep(0.5) time.sleep(0.5)
@sock.route('/echo')
def route_echo(sock):
while True:
data = sock.receive()
sock.send(data)