add echo route
This commit is contained in:
parent
e14a063a28
commit
fc5a5e1cc1
1 changed files with 6 additions and 0 deletions
6
app.py
6
app.py
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue