Appearance
Interface: Transport
Properties
| Property | Modifier | Type |
|---|---|---|
state | readonly | TransportState |
Methods
close()
ts
close(code?, reason?): void;Parameters
| Parameter | Type |
|---|---|
code? | number |
reason? | string |
Returns
void
open()
ts
open(handlers): void;Begins connecting. handlers.onOpen or handlers.onClose will follow.
Parameters
| Parameter | Type |
|---|---|
handlers | TransportHandlers |
Returns
void
send()
ts
send(bytes): void;Never throws: a send on a dead socket is reported through onClose, which is the path a caller already has to handle.
Parameters
| Parameter | Type |
|---|---|
bytes | Uint8Array |
Returns
void