RSocketRequester constructor

RSocketRequester(
  1. String mode,
  2. ConnectionSetupPayload connectionSetupPayload,
  3. DuplexConnection connection
)

Implementation

RSocketRequester(String mode, ConnectionSetupPayload connectionSetupPayload,
    DuplexConnection connection) {
  this.mode = mode;
  if (mode == 'requester') {
    streamIdSupplier = StreamIdSupplier.clientSupplier();
  } else {
    streamIdSupplier = StreamIdSupplier.serverSupplier();
  }
  this.connectionSetupPayload = connectionSetupPayload;
  this.connection = connection;
  if (this.connection.receiveHandler == null) {
    this.connection.receiveHandler = (chunk) => receiveChunk(chunk);
  }
  this.connection.closeHandler = () {
    close();
  };
  initRSocketCallStubs();
}