communication.layers.IoSocketClientLayer - ZeMA-gGmbH/NoPE-JS GitHub Wiki

Class: IoSocketClientLayer

communication.layers.IoSocketClientLayer

Mirror Layer using IO-Sockets.

Export

Hierarchy

Constructors

constructor

new IoSocketClientLayer(uri, logger?)

Creates an instance of IoSocketMirrorClient.

Author

M.Karkowski

Memberof

IoSocketMirrorClient

Parameters

Name Type Default value
uri string undefined
logger? ValidLoggerDefinition "info"

Overrides

EventCommunicationInterface.constructor

Properties

connected

connected: INopeObservable<boolean, boolean, boolean, IEventAdditionalData>

Flag, showing whether the Mirror is connected or not.

Memberof

EventMirror

Inherited from

EventCommunicationInterface.connected


id

id: string

ID of the Layer.

Author

M.Karkowski

Memberof

ICommunicationInterface

Inherited from

EventCommunicationInterface.id


receivesOwnMessages

Readonly receivesOwnMessages: boolean = true

Used to show, whether the the layer receives its own messages

Memberof

ICommunicationInterface

Inherited from

EventCommunicationInterface.receivesOwnMessages


uri

uri: string

Methods

detailListeners

detailListeners(type, listeners): void

Helper to detail the listeners of the "event", "rpc", "data" or "responses"

Parameters

Name Type Description
type "event" | "rpc" | "data" | "response" valid type to detail the name
listeners string[] the currently used listeners.

Returns

void

Inherited from

EventCommunicationInterface.detailListeners


dispose

dispose(): Promise<void>

Disconnect the Layer.

Memberof

ICommunicationInterface

Returns

Promise<void>

{Promise}

Overrides

EventCommunicationInterface.dispose


emit

emit<T>(eventname, data): Promise<void>

Function, which will be used to emit data

Memberof

EventMirror

Type parameters

Name Type
T extends keyof EventnameToEventType

Parameters

Name Type Description
eventname T -
data EventnameToEventType[T] the data to emit

Returns

Promise<void>

Inherited from

EventCommunicationInterface.emit


on

on<T>(eventname, cb): Promise<void>

Function which will be used to subscribe Data

Memberof

EventMirror

Type parameters

Name Type
T extends keyof EventnameToEventType

Parameters

Name Type
eventname T
cb (data: EventnameToEventType[T]) => void

Returns

Promise<void>

Inherited from

EventCommunicationInterface.on

⚠️ **GitHub.com Fallback** ⚠️