swarpc - v0.19.0
    Preparing search index...

      swarpc - v0.19.0

      Documents

      README
      CHANGELOG

      Classes

      RequestCancelledError

      A cancelable request was cancelled (either via .cancelable's .cancel() or via a .once / .onceBy call)

      Type Aliases

      SwarpcClient

      The sw&rpc client instance, which provides methods to call procedures. Each property of the procedures map will be a method, that accepts an input, an optional onProgress callback and an optional request ID. If you want to be able to cancel the request, you can set the request's ID yourself, and call .abort(requestId, reason) on the client instance to cancel it.

      SwarpcServer

      The sw&rpc server instance, which provides methods to register procedure implementations, and listens for incoming messages that call those procedures

      Procedure

      A procedure declaration

      CancelablePromise

      A promise that you can cancel by calling .cancel(reason) on it:

      ProcedureImplementation

      An implementation of a procedure

      ProceduresMap

      Declarations of procedures by name.

      Hooks

      Declaration of hooks to run on messages received from the server

      PayloadCore
      ClientMethodCallable

      The callable function signature for a client method

      Broadcaster

      A procedure that broadcasts its request to multiple nodes. The return value is an array of results, along with extra properties: see BroadcasterResultExtrasMixed, BroadcasterResultExtrasSuccess and BroadcasterResultExtrasFailure

      BroadcasterResultExtrasMixed

      Extra properties on the result of a broadcaster call, when some nodes succeeded and some failed

      BroadcasterResultExtrasSuccess

      Extra properties on the result of a broadcaster call, when all nodes succeeded

      BroadcasterResultExtrasFailure

      Extra properties on the result of a broadcaster call, when all nodes failed

      ClientMethodExtraCallables
      ClientMethod

      A procedure's corresponding method on the client instance -- used to call the procedure. If you want to be able to cancel the request, you can use the cancelable method instead of running the procedure directly.

      WorkerConstructor

      Variables

      RESERVED_PROCEDURE_NAMES

      Names that can't be used as procedure names. Will fail at runtime, when starting the client.

      zImplementations

      Functions

      Client
      Server

      Creates a sw&rpc server instance.