@@ -159,7 +159,12 @@ def state(self) -> State:
159159 """
160160 State of the WebSocket connection.
161161
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
163168
164169 """
165170 return self ._state
@@ -173,10 +178,11 @@ def state(self, state: State) -> None:
173178 @property
174179 def close_code (self ) -> int | None :
175180 """
176- `WebSocket close code`_.
181+ WebSocket close code received from the remote endpoint.
182+
183+ Defined in 7.1.5_ of :rfc:`6455`.
177184
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
180186
181187 :obj:`None` if the connection isn't closed yet.
182188
@@ -191,10 +197,11 @@ def close_code(self) -> int | None:
191197 @property
192198 def close_reason (self ) -> str | None :
193199 """
194- `WebSocket close reason`_.
200+ WebSocket close reason received from the remote endpoint.
201+
202+ Defined in 7.1.6_ of :rfc:`6455`.
195203
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
198205
199206 :obj:`None` if the connection isn't closed yet.
200207
0 commit comments