• new ClientInstance(transport
, pakettoInstance?
, bufferSize?
)
Name | Type |
---|---|
transport |
ITransport |
pakettoInstance |
PakettoInstance |
bufferSize |
number |
• Private
_paketto: PakettoInstance
• Optional
onClose: () => void
▸ (): void
void
• Optional
onMessage: (event
: string
| number
, data
: unknown
) => void
▸ (event
, data
): void
Name | Type |
---|---|
event |
string | number |
data |
unknown |
void
• Readonly
transport: ITransport
▸ close(): void
void
▸ connect(serverAddr
): Promise
<ClientInstance
>
Name | Type |
---|---|
serverAddr |
string |
Promise
<ClientInstance
>
▸ send(event
, message
): void
Name | Type |
---|---|
event |
string | number |
message |
unknown |
void