Optional
fromOptional
idOptional
logger?: LoggerOptional
middlewareMiddleware used to process the rpc messages.
The middlewareFactory needs to be a function that creates a pair of
transform streams that convert Uint8Array
to JSONRPCRequest
on the forward
path and JSONRPCResponse
to Uint8Array
on the reverse path.
Optional
replacer?: ((key, value) => any)Optional
timeoutTime before a stream is cleaned up due to no activity. This is the value used if the handler doesn't specify its own timeout time. This timeout is advisory and only results in a signal sent to the handler. Stream is forced to end after the timeoutForceCloseTime. Defaults to 60,000 milliseconds.
Readonly
[initProtected
activeProtected
defaultProtected
fromProtected
handlerProtected
idProtected
loggerProtected
middlewareProtected
Optional
replacerProtected
timeoutProtected
registerProtected
registerThe ID is generated only once when the function is called and stored in the id variable. the ID is associated with the entire stream Every response (whether successful or an error) produced within this stream will have the same ID, which is consistent with the originating request.
Protected
registerRegisters a raw stream handler. This is the basis for all handlers as handling the streams is done with raw streams only. The raw streams do not automatically refresh the timeout timer when messages are sent or received.
Protected
registerProtected
registerStarts RPC server.
Server manifest used to define the rpc method handlers.
Generated using TypeDoc
RPCServer Constructor