import { ProtocolHandler } from "https://deno.land/x/natsws@v1.28.0/src/nats-base-client.ts";
Constructors
new
ProtocolHandler(options: ConnectionOptions, publisher: Publisher)Properties
closed: Deferred<Error | void>
heartbeats: Heartbeat
optional
info: ServerInfooptional
lastError: NatsErrorlisteners: QueuedIterator<Status>[]
muxSubscriptions: MuxSubscription
options: ConnectionOptions
outbound: DataBuffer
parser: Parser
pongs: Array<Deferred<void>>
publisher: Publisher
subscriptions: Subscriptions
transport: Transport
Methods
private
_close(err?: Error): Promise<void>private
flushPending()private
initMux(): voidprivate
selectServer(): ServerImpl | undefined_sub(s: SubscriptionImpl): void
close(): Promise<void>
dialLoop(): Promise<void>
disconnect(): void
disconnected(err?: Error): Promise<void>
dispatchStatus(status: Status): void
dodialLoop(): Promise<void>
drain(): Promise<void>
getServer(): ServerImpl | undefined
handleAuthError(err: NatsError)
handleError(err: NatsError)
isClosed(): boolean
processError(m: Uint8Array)
processInfo(m: Uint8Array)
processMsg(msg: MsgArg, data: Uint8Array)
publish()
push(e: ParserEvent): void
reconnect(): Promise<void>
resetOutbound(): void
resub(s: SubscriptionImpl, subject: string)
sendCommand(cmd: string | Uint8Array, ...payloads: Uint8Array[])
unsub(s: SubscriptionImpl, max?: number)
unsubscribe(s: SubscriptionImpl, max?: number)
Static Methods
connect(options: ConnectionOptions, publisher: Publisher): Promise<ProtocolHandler>
toError(s: string)