client

Module: client

Members

Methods

Creates a ClientApi for the given protocol handler.

Parameters
Name Type Description
protocol object

The protocol that should be wrapped.

Properties
Name Type Attributes Description
init function <optional>

Called after the ClientApi that will be returned is prepared. Gets the Protocol object it was assigned to as its context.

closer function

Called if a route is closed by the used. It gets the route array as its first parameter and the close data as its second. The protocol object the closer was assigned to is used as the context.

Returns

A ClientApi for protocol.

Type
ClientApi

Methods

(static) isApi(api) → {boolean}

Returns whether the given object is a ClientApi instance.

Parameters
Name Type Description
api any

The api to check. This can be any value. The method will always return false for non-objects.

Returns

true if api is a ClientApi. false if not.

Type
boolean