Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ export class InlineWebSocketAdapter implements UniversalWebSocket {
readyState: 1,
});

// Set __adapter on WSContext so handleRawWebSocket.onMessage can route messages back
(this.#wsContext as any).__adapter = this;

// Initialize the connection
//
// Defer initialization to allow event listeners to be attached first
Expand Down Expand Up @@ -207,6 +210,12 @@ export class InlineWebSocketAdapter implements UniversalWebSocket {
this.close(1011, "Internal error during initialization");
}
}
/**
* Handle message from actor (called via __adapter from handleRawWebSocket.onMessage)
*/
_handleMessage(event: MessageEvent) {
this.#handleMessage(event.data);
}

/**
* Handle messages received from the server via the WSContext
Expand Down