RpcTransportMessage constructor

RpcTransportMessage({
  1. Uint8List? payload,
  2. Object? directPayload,
  3. RpcMetadata? metadata,
  4. bool isEndOfStream = false,
  5. String? methodPath,
  6. required int streamId,
})

Creates a transport message.

Implementation

RpcTransportMessage({
  this.payload,
  this.directPayload,
  this.metadata,
  this.isEndOfStream = false,
  this.methodPath,
  required this.streamId,
}) {
  if (payload != null && directPayload != null) {
    throw ArgumentError('Specify either payload or directPayload, not both');
  }
}