applyToBuffer method

  1. @override
void applyToBuffer(
  1. PgByteDataWriter buffer
)
override

Implementation

@override
void applyToBuffer(PgByteDataWriter buffer) {
  final name = buffer.encodeString(_name);
  final length = 6 + name.bytesLength;

  buffer
    ..writeUint8(ClientMessageId.close)
    ..writeInt32(length)
    ..writeUint8(_isForPortal ? $P : $S);
  buffer.writeEncodedString(name);
}