send

open suspend override fun send(message: JSONRPCMessage, options: TransportSendOptions?)(source)

Queues message for the writer coroutine. Suspends when the outbound channel is full, applying back-pressure to the caller. Throws McpException with RPCError.ErrorCode.CONNECTION_CLOSED if the transport has not been started or has already closed.

Parameters

message

JSON-RPC message to send

options

transport-specific send options; ignored by this transport