///
import { Single } from "rsocket-flowable";
import { DuplexConnection, Payload, ReactiveSocket, Responder } from "rsocket-types";
import { Leases } from "./RSocketLease";
import { PayloadSerializers } from "./RSocketSerialization";
export interface ClientConfig {
serializers?: PayloadSerializers | undefined;
setup: {
payload?: Payload | undefined;
dataMimeType: string;
keepAlive: number;
lifetime: number;
metadataMimeType: string;
};
transport: DuplexConnection;
responder?: Partial> | undefined;
errorHandler?: ((error: Error) => void) | undefined;
leases?: (() => Leases) | undefined;
}
/**
* RSocketClient: A client in an RSocket connection that will communicates with
* the peer via the given transport client. Provides methods for establishing a
* connection and initiating the RSocket interactions:
* - fireAndForget()
* - requestResponse()
* - requestStream()
* - requestChannel()
* - metadataPush()
*/
export default class RSocketClient {
constructor(config: ClientConfig);
close(): void;
connect(): Single>;
}