mirror of https://github.com/encode/starlette.git
Remove self from websocker example app (#1103)
Co-authored-by: Jamie Hewland <jhewland@gmail.com>
This commit is contained in:
parent
fe908b1c29
commit
2b83c8cea6
|
@ -10,7 +10,7 @@ Signature: `WebSocket(scope, receive=None, send=None)`
|
||||||
from starlette.websockets import WebSocket
|
from starlette.websockets import WebSocket
|
||||||
|
|
||||||
|
|
||||||
async def app(self, scope, receive, send):
|
async def app(scope, receive, send):
|
||||||
websocket = WebSocket(scope=scope, receive=receive, send=send)
|
websocket = WebSocket(scope=scope, receive=receive, send=send)
|
||||||
await websocket.accept()
|
await websocket.accept()
|
||||||
await websocket.send_text('Hello, world!')
|
await websocket.send_text('Hello, world!')
|
||||||
|
|
Loading…
Reference in New Issue