We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0238855 commit 3fb8472Copy full SHA for 3fb8472
src/inMemory.ts
@@ -7,10 +7,10 @@ import { JSONRPCMessage } from "./types.js";
7
export class InMemoryTransport implements Transport {
8
private _otherTransport?: InMemoryTransport;
9
private _messageQueue: JSONRPCMessage[] = [];
10
+ _messageBuffer: JSONRPCMessage[] = [];
11
12
onclose?: () => void;
13
onerror?: (error: Error) => void;
- onmessage?: (message: JSONRPCMessage) => void;
14
sessionId?: string;
15
16
/**
@@ -52,4 +52,8 @@ export class InMemoryTransport implements Transport {
52
this._otherTransport._messageQueue.push(message);
53
}
54
55
+
56
+ onmessage(message: JSONRPCMessage) {
57
+ this._messageBuffer.push(message)
58
+ }
59
0 commit comments