Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
class WsTransport
implements Transport
import { WsTransport } from "https://deno.land/x/natsws@v1.29.2/src/ws_transport.ts";

Constructors

new
WsTransport()

Properties

private
done: boolean
private
options: WsConnectionOptions
private
socket: WebSocket
closedNotification: Deferred<void | Error>
optional
closeError: Error
connected: boolean
encrypted: boolean
readonly
isClosed: boolean
lang: string
peeked: boolean
signal: Deferred<void>
socketClosed: boolean
version: string
yields: Uint8Array[]

Methods

private
_closed(err?: Error, internal?): Promise<void>
close(err?: Error | undefined): Promise<void>
closed(): Promise<void | Error>
connect(server: Server, options: WsConnectionOptions): Promise<void>
disconnect(): void
isDiscarded(): boolean
isEncrypted(): boolean
iterate(): AsyncIterableIterator<Uint8Array>
send(frame: Uint8Array): void