Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Method<T>

A method represents a request from a client to call a method on the recipient. They can contain arguments which the recipient will use as arguments for the method.

The Recipient can then reply with a result or an error indicating the method failed.

Type parameters

  • T

Hierarchy

  • Method

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Method(method: string, params: T, discard?: boolean, id?: number): Method
  • Parameters

    • method: string
    • params: T
    • Default value discard: boolean = false
    • Default value id: number = Math.floor(Math.random() * maxInt32)

    Returns Method

Properties

discard

discard: boolean

If discard is set to true it indicates that this method is not expecting a reply.

Recipients should however reply with an error if one is caused by this method.

id

id: number

A Unique id for each method sent.

method

method: string

The name of this method

params

params: T

Params to be used as arguments for this method.

seq

seq: number

type

type: "method" = "method"

Methods

reply

Static fromSocket

Generated using TypeDoc