@@ -159,7 +159,12 @@ def state(self) -> State:
159
159
"""
160
160
State of the WebSocket connection.
161
161
162
- Defined in 4.1, 4.2, 7.1.3, and 7.1.4 of :rfc:`6455`.
162
+ Defined in 4.1_, 4.2_, 7.1.3_, and 7.1.4_ of :rfc:`6455`.
163
+
164
+ .. _4.1: https://datatracker.ietf.org/doc/html/rfc6455#section-4.1
165
+ .. _4.2: https://datatracker.ietf.org/doc/html/rfc6455#section-4.2
166
+ .. _7.1.3: https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.3
167
+ .. _7.1.4: https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4
163
168
164
169
"""
165
170
return self ._state
@@ -173,10 +178,11 @@ def state(self, state: State) -> None:
173
178
@property
174
179
def close_code (self ) -> int | None :
175
180
"""
176
- `WebSocket close code`_.
181
+ WebSocket close code received from the remote endpoint.
182
+
183
+ Defined in 7.1.5_ of :rfc:`6455`.
177
184
178
- .. _WebSocket close code:
179
- https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5
185
+ .. _7.1.5: https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5
180
186
181
187
:obj:`None` if the connection isn't closed yet.
182
188
@@ -191,10 +197,11 @@ def close_code(self) -> int | None:
191
197
@property
192
198
def close_reason (self ) -> str | None :
193
199
"""
194
- `WebSocket close reason`_.
200
+ WebSocket close reason received from the remote endpoint.
201
+
202
+ Defined in 7.1.6_ of :rfc:`6455`.
195
203
196
- .. _WebSocket close reason:
197
- https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6
204
+ .. _7.1.6: https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6
198
205
199
206
:obj:`None` if the connection isn't closed yet.
200
207
0 commit comments