Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/aiohttp/http_websocket.py: 100%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

7 statements  

1"""WebSocket protocol versions 13 and 8.""" 

2 

3from ._websocket.helpers import WS_KEY, ws_ext_gen, ws_ext_parse 

4from ._websocket.models import ( 

5 WS_CLOSED_MESSAGE, 

6 WS_CLOSING_MESSAGE, 

7 WebSocketError, 

8 WSCloseCode, 

9 WSHandshakeError, 

10 WSMessage, 

11 WSMessageDecodeText, 

12 WSMessageNoDecodeText, 

13 WSMessageTextBytes, 

14 WSMsgType, 

15) 

16from ._websocket.reader import WebSocketReader 

17from ._websocket.writer import WebSocketWriter 

18 

19# Messages that the WebSocketResponse.receive needs to handle internally 

20_INTERNAL_RECEIVE_TYPES = frozenset( 

21 (WSMsgType.CLOSE, WSMsgType.CLOSING, WSMsgType.PING, WSMsgType.PONG) 

22) 

23 

24 

25__all__ = ( 

26 "WS_CLOSED_MESSAGE", 

27 "WS_CLOSING_MESSAGE", 

28 "WS_KEY", 

29 "WebSocketReader", 

30 "WebSocketWriter", 

31 "WSMessage", 

32 "WSMessageDecodeText", 

33 "WSMessageNoDecodeText", 

34 "WSMessageTextBytes", 

35 "WebSocketError", 

36 "WSMsgType", 

37 "WSCloseCode", 

38 "ws_ext_gen", 

39 "ws_ext_parse", 

40 "WSHandshakeError", 

41)