OutboundQueue constructor

OutboundQueue({
  1. required Future<void> send(
    1. Uint8List bytes
    ),
  2. bool isReady()?,
  3. bool canSend(
    1. Uint8List bytes
    )?,
  4. bool Function() createSendGuard(
    1. Uint8List bytes
    )?,
  5. bool Function() createDecodedSendGuard(
    1. String type,
    2. Map<String, Object?> payload
    )?,
  6. void onDropped(
    1. String type
    )?,
  7. Uint8List? substituteOnReject(
    1. String type,
    2. Uint8List bytes,
    3. String reason
    )?,
  8. int? maxPayloadBytes,
  9. int maxAttempts = 3,
  10. Duration backoffBase = const Duration(milliseconds: 200),
  11. int lossyCap = 32,
  12. int guaranteedCap = 64,
  13. Duration readyPoll = const Duration(milliseconds: 250),
  14. Future<void> sleep(
    1. Duration
    )?,
})

Implementation

OutboundQueue({
  required this.send,
  this.isReady,
  this.canSend,
  this.createSendGuard,
  this.createDecodedSendGuard,
  this.onDropped,
  this.substituteOnReject,
  this.maxPayloadBytes,
  this.maxAttempts = 3,
  this.backoffBase = const Duration(milliseconds: 200),
  this.lossyCap = 32,
  this.guaranteedCap = 64,
  this.readyPoll = const Duration(milliseconds: 250),
  Future<void> Function(Duration)? sleep,
}) : _sleep = sleep ?? _defaultSleep;