switch to optional Transport.setProtocolVersion
This commit is contained in:
parent
4aaa26d900
commit
33257f14d4
3 changed files with 22 additions and 17 deletions
|
|
@ -254,9 +254,6 @@ export class Server<
|
|||
const protocolVersion = SUPPORTED_PROTOCOL_VERSIONS.includes(requestedVersion)
|
||||
? requestedVersion
|
||||
: LATEST_PROTOCOL_VERSION;
|
||||
if (this.transport) {
|
||||
this.transport.protocolVersion = protocolVersion;
|
||||
}
|
||||
|
||||
return {
|
||||
protocolVersion,
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ const MAXIMUM_MESSAGE_SIZE = "4mb";
|
|||
export class SSEServerTransport implements Transport {
|
||||
private _sseResponse?: ServerResponse;
|
||||
private _sessionId: string;
|
||||
|
||||
protocolVersion?: string;
|
||||
onclose?: () => void;
|
||||
onerror?: (error: Error) => void;
|
||||
onmessage?: (message: JSONRPCMessage, extra?: { authInfo?: AuthInfo }) => void;
|
||||
|
|
|
|||
|
|
@ -111,7 +111,6 @@ export class StreamableHTTPServerTransport implements Transport {
|
|||
private _onsessioninitialized?: (sessionId: string) => void;
|
||||
|
||||
sessionId?: string;
|
||||
protocolVersion?: string;
|
||||
onclose?: () => void;
|
||||
onerror?: (error: Error) => void;
|
||||
onmessage?: (message: JSONRPCMessage, extra?: { authInfo?: AuthInfo }) => void;
|
||||
|
|
|
|||
Loading…
Reference in a new issue