Skip to content

Commit abbf4b2

Browse files
committed
Fixing broken method formatting.
1 parent 6047f25 commit abbf4b2

File tree

1 file changed

+7
-31
lines changed

1 file changed

+7
-31
lines changed

src/content/docs/durable-objects/api/websockets.mdx

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ To learn more about WebSocket Hibernation, refer to [Build a WebSocket server wi
2727

2828
### serializeAttachment
2929

30-
- <code>
31-
serializeAttachment(value <Type text="any" />)
32-
</code>
33-
: <Type text="void" />
30+
- <code> serializeAttachment(value <Type text="any" />)</code>: <Type text="void" />
3431

3532
- Keeps a copy of `value` in memory (not on disk) to survive hibernation. The value can be any type supported by the [structured clone algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm), which is true of most types.
3633

@@ -46,11 +43,7 @@ To learn more about WebSocket Hibernation, refer to [Build a WebSocket server wi
4643

4744
### acceptWebSocket
4845

49-
- <code>
50-
acceptWebSocket(ws <Type text="WebSocket" />, tags{" "}
51-
<Type text="Array<string>" /> <MetaInfo text="optional" />)
52-
</code>
53-
: <Type text="void" />
46+
- <code>acceptWebSocket(ws <Type text="WebSocket" />, tags{" "}<Type text="Array<string>" /> <MetaInfo text="optional" />)</code>: <Type text="void" />
5447

5548
- Adds a WebSocket to the set attached to this Durable Object. `ws.accept()` must not have been called separately. Once called, any incoming messages will be delivered by calling the Durable Object's `webSocketMessage()` handler, and `webSocketClose()` will be invoked upon disconnect.
5649

@@ -62,10 +55,7 @@ To learn more about WebSocket Hibernation, refer to [Build a WebSocket server wi
6255

6356
### getWebSockets
6457

65-
- <code>
66-
getWebSockets(tag <Type text="string" /> <MetaInfo text="optional" />)
67-
</code>
68-
: <Type text="Array<WebSocket>" />
58+
- <code>getWebSockets(tag <Type text="string" /> <MetaInfo text="optional" />)</code>: <Type text="Array<WebSocket>" />
6959

7060
- Gets an array of accepted WebSockets matching the given tag. Disconnected WebSockets <sup>1</sup> are automatically removed from the list. Calling `state.getWebSockets()` with no `tag` argument will return all WebSockets.
7161

@@ -78,20 +68,13 @@ To learn more about WebSocket Hibernation, refer to [Build a WebSocket server wi
7868

7969
### getTags
8070

81-
- <code>
82-
getTags(ws <Type text="WebSocket" />)
83-
</code>
84-
: <Type text="Array<string>" />
71+
- <code>getTags(ws <Type text="WebSocket" />)</code>: <Type text="Array<string>" />
8572

8673
- Returns an Array of tags associated with the given WebSocket. Throws an error if you have not called `state.acceptWebSocket()` on the given WebSocket.
8774

8875
### setWebSocketAutoResponse
8976

90-
- <code>
91-
setWebSocketAutoResponse(webSocketRequestResponsePair{" "}
92-
<Type text="WebSocketRequestResponsePair" /> <MetaInfo text="optional" />)
93-
</code>
94-
: <Type text="void" />
77+
- <code>setWebSocketAutoResponse(webSocketRequestResponsePair{" "}<Type text="WebSocketRequestResponsePair" /> <MetaInfo text="optional" />)</code>: <Type text="void" />
9578

9679
- Sets an application level auto response that does not wake hibernated WebSockets.
9780

@@ -113,20 +96,13 @@ To learn more about WebSocket Hibernation, refer to [Build a WebSocket server wi
11396

11497
### getWebSocketAutoResponseTimestamp
11598

116-
- <code>
117-
getWebSocketAutoResponseTimestamp(ws <Type text="WebSocket" />)
118-
</code>
119-
: <Type text="Date | null" />
99+
- <code>getWebSocketAutoResponseTimestamp(ws <Type text="WebSocket" />)</code>: <Type text="Date | null" />
120100

121101
- Gets the most recent `Date` when the WebSocket received an auto-response request, or `null` if the given WebSocket never received an auto-response request.
122102

123103
### setHibernatableWebSocketEventTimeout
124104

125-
- <code>
126-
setHibernatableWebSocketEventTimeout(timeout <Type text="number" />{" "}
127-
<MetaInfo text="optional" />)
128-
</code>
129-
: <Type text="void" />
105+
- <code>setHibernatableWebSocketEventTimeout(timeout <Type text="number" />{" "}<MetaInfo text="optional" />)</code>: <Type text="void" />
130106

131107
- Sets the maximum amount of milliseconds a WebSocket event (refer to the handler methods below) can run for.
132108

0 commit comments

Comments
 (0)