class NatsConnectionImpl
implements NatsConnection
import { NatsConnectionImpl } from "https://deno.land/x/natsws@v1.28.0/src/nats-base-client.ts";
Constructors
new
private
NatsConnectionImpl(opts: ConnectionOptions)Properties
_services: ServicesAPI
readonly
info: ServerInfo | undefinedlisteners: QueuedIterator<Status>[]
options: ConnectionOptions
protocol: ProtocolHandler
readonly
services: ServicesAPIMethods
_check()
subject: string,
sub: boolean,
pub: boolean,
_resub()
close()
closed(): Promise<void | Error>
context(): Promise<Context>
drain(): Promise<void>
flush(): Promise<void>
Flushes to the server. Promise resolves when round-trip completes.
getServer(): string
getServerVersion(): SemVer | undefined
isClosed(): boolean
isDraining(): boolean
jetstream(opts?: JetStreamOptions | JetStreamManagerOptions): JetStreamClient
jetstreamManager(opts?: JetStreamManagerOptions): Promise<JetStreamManager>
publish(): void
publishMessage(msg: Msg)
reconnect(): Promise<void>
requestMany(): Promise<QueuedIterator<Msg>>
respondMessage(msg: Msg)
rtt(): Promise<number>
subscribe(subject: string, opts?: SubscriptionOptions): Subscription
Static Methods
connect(opts?: ConnectionOptions): Promise<NatsConnection>