Adapts a `AttachMessageTransport` function defined in `@tracerbench/message-transport` into an `AttachProtocolTransport<SessionId>` function which is used to create a send function.
npm install @tracerbench/protocol-transportAdapts a AttachMessageTransport function defined in @tracerbench/message-transport into
an AttachProtocolTransport function which is used to create a send function.
``ts
export type AttachProtocolTransport
onEvent: OnEvent,
onError: OnError,
onClose: OnClose,
) => [
AttachSession
DetachSession
SendMethod
RaceCancellation
];
export type AttachSession
sessionId: SessionId,
) => AttachProtocolTransport
export type DetachSession
export type SendMethod
Method extends string,
Params extends object,
Result extends object
>(
method: Method,
params?: Params,
raceCancellation?: RaceCancellation,
) => Promise
``