Skip to content

Latest commit

 

History

History
156 lines (87 loc) · 2.62 KB

ClientInstance.md

File metadata and controls

156 lines (87 loc) · 2.62 KB

Class: ClientInstance

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new ClientInstance(transport, pakettoInstance?, bufferSize?)

Parameters

Name Type
transport ITransport
pakettoInstance PakettoInstance
bufferSize number

Defined in

Client.ts:22

Properties

_paketto

Private _paketto: PakettoInstance

Defined in

Client.ts:20


onClose

Optional onClose: () => void

Type declaration

▸ (): void

Returns

void

Defined in

Client.ts:44


onMessage

Optional onMessage: (event: string | number, data: unknown) => void

Type declaration

▸ (event, data): void

Parameters
Name Type
event string | number
data unknown
Returns

void

Defined in

Client.ts:43


transport

Readonly transport: ITransport

Defined in

Client.ts:19

Methods

close

close(): void

Returns

void

Defined in

Client.ts:107


connect

connect(serverAddr): Promise<ClientInstance>

Parameters

Name Type
serverAddr string

Returns

Promise<ClientInstance>

Defined in

Client.ts:88


send

send(event, message): void

Parameters

Name Type
event string | number
message unknown

Returns

void

Defined in

Client.ts:71