Skip to content

WebSocketClose

faststream.asgi.websocket.WebSocketClose #

WebSocketClose(code, reason)
Source code in faststream/asgi/websocket.py
def __init__(
    self,
    code: int,
    reason: Optional[str],
) -> None:
    self.code = code
    self.reason = reason or ""

code instance-attribute #

code = code

reason instance-attribute #

reason = reason or ''