goAway static method

YamuxFrame goAway(
  1. int reason
)

Creates a GO_AWAY frame

Implementation

static YamuxFrame goAway(int reason) {
  final data = ByteData(4)..setUint32(0, reason, Endian.big);
  return YamuxFrame(
    type: YamuxFrameType.goAway,
    flags: 0,
    streamId: 0,
    length: 4,
    data: data.buffer.asUint8List(),
  );
}