add echo route

This commit is contained in:
Morgan 'ARR\!' Allen 2023-10-19 11:51:06 -07:00
parent e14a063a28
commit fc5a5e1cc1
1 changed files with 6 additions and 0 deletions

6
app.py
View File

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