Skip to main content
Module

x/rsocket/mod.ts>RSocket

🦕RSocket Deno module
Latest
interface RSocket
import { type RSocket } from "https://deno.land/x/rsocket@0.3.0/mod.ts";

Methods

fireAndForget(payload: Payload): Promise<void>

Fire and Forget interaction model of ReactiveSocket. The returned Publisher resolves when the passed payload is successfully handled.

requestResponse(payload: Payload): Promise<Payload>

Request-Response interaction model of ReactiveSocket. The returned Publisher resolves with the response.

requestStream(payload: Payload): Publisher<Payload>

Request-Stream interaction model of ReactiveSocket. The returned Publisher returns values representing the response(s).

requestChannel(payloads: Publisher<Payload>): Publisher<Payload>

Request-Channel interaction model of ReactiveSocket. The returned Publisher returns values representing the response(s).

metadataPush(payload: Payload): Promise<void>

Metadata-Push interaction model of ReactiveSocket. The returned Publisher resolves when the passed payload is successfully handled.

close(): void

Close this ReactiveSocket and the underlying transport connection.

availability(): number

Returns positive number representing the availability of RSocket requester. Higher is better, 0.0 means not available.