MCPcopy
hub / github.com/aio-libs/aiohttp / handler

Function handler

tests/test_websocket_client_functional.py:11–18  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

9
10 @asyncio.coroutine
11 def handler(request):
12 ws = web.WebSocketResponse()
13 yield from ws.prepare(request)
14
15 msg = yield from ws.receive_str()
16 ws.send_str(msg+'/answer')
17 yield from ws.close()
18 return ws
19
20 app, client = yield from create_app_and_client()
21 app.router.add_route('GET', '/', handler)

Callers

nothing calls this directly

Calls 8

prepareMethod · 0.95
receive_strMethod · 0.95
send_strMethod · 0.95
closeMethod · 0.95
receive_bytesMethod · 0.95
send_bytesMethod · 0.95
pingMethod · 0.95
receiveMethod · 0.95

Tested by

no test coverage detected