Class MultiplexedWebsocketTransport

java.lang.Object
io.deephaven.web.client.api.grpc.MultiplexedWebsocketTransport
All Implemented Interfaces:
GrpcTransport

public class MultiplexedWebsocketTransport extends Object implements GrpcTransport
Custom replacement for grpc-websockets transport that handles multiple grpc streams in a single websocket. All else equal, this transport should be preferred to the default grpc-websockets transport, and in turn the fetch based transport is usually superior to this.
  • Field Details

  • Constructor Details

    • MultiplexedWebsocketTransport

      public MultiplexedWebsocketTransport(GrpcTransportOptions options)
  • Method Details

    • start

      public void start(jsinterop.base.JsPropertyMap<HeaderValueUnion> metadata)
      Description copied from interface: GrpcTransport
      Starts the stream, sending metadata to the server.
      Specified by:
      start in interface GrpcTransport
      Parameters:
      metadata - the headers to send the server when opening the connection
    • sendMessage

      public void sendMessage(elemental2.core.Uint8Array msgBytes)
      Description copied from interface: GrpcTransport
      Sends a message to the server.
      Specified by:
      sendMessage in interface GrpcTransport
      Parameters:
      msgBytes - bytes to send to the server
    • finishSend

      public void finishSend()
      Description copied from interface: GrpcTransport
      "Half close" the stream, signaling to the server that no more messages will be sent, but that the client is still open to receiving messages.
      Specified by:
      finishSend in interface GrpcTransport
    • cancel

      public void cancel()
      Description copied from interface: GrpcTransport
      End the stream, both notifying the server that no more messages will be sent nor received, and preventing the client from receiving any more events.
      Specified by:
      cancel in interface GrpcTransport