Add start() to Transport interface
This commit is contained in:
parent
73c66f4a7c
commit
87ae7ffc5a
1 changed files with 7 additions and 0 deletions
|
|
@ -4,6 +4,13 @@ import { JSONRPCMessage } from "../types.js";
|
|||
* Describes the minimal contract for a MCP transport that a client or server can communicate over.
|
||||
*/
|
||||
export interface Transport {
|
||||
/**
|
||||
* Starts processing messages on the transport, including any connection steps that might need to be taken.
|
||||
*
|
||||
* This method should only be called after callbacks are installed, or else messages may be lost.
|
||||
*/
|
||||
start(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Sends a JSON-RPC message (request or response).
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue