DefinitelyTyped/types/rsocket-websocket-client/RSocketWebSocketClient.d.ts
Adrian Hope-Bailie 8727a4fa0a Add rsocket types (#36076)
* Add rsocket types

* Drop `types` from `tsconfig.json

Use triple-slash references

* Fix linting errors

* Remove private members

* Fix linting errors
2019-06-20 14:05:22 -07:00

27 lines
773 B
TypeScript

import { ConnectionStatus, DuplexConnection, Frame, ISubject, ISubscriber, ISubscription, CONNECTION_STATUS } from 'rsocket-types';
import { Flowable } from 'rsocket-flowable';
import {
deserializeFrame,
deserializeFrameWithLength,
Encoders,
printFrame,
serializeFrame,
serializeFrameWithLength,
toBuffer,
} from 'rsocket-core';
import * as ws from 'ws';
/**
* A WebSocket transport client for use in browser environments.
*/
export default class RSocketWebSocketClient implements DuplexConnection {
constructor(options: ws.ClientOptions, encoders?: Encoders<any>)
close(): void;
connect(): void;
connectionStatus(): Flowable<ConnectionStatus>;
receive(): Flowable<Frame>;
sendOne(frame: Frame): void;
send(frames: Flowable<Frame>): void;
}