BadServerSalt.deserialize constructor

BadServerSalt.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory BadServerSalt.deserialize(BinaryReader reader) {
  // Read [BadServerSalt] fields.
  final badMsgId = reader.readInt64();
  final badMsgSeqno = reader.readInt32();
  final errorCode = reader.readInt32();
  final newServerSalt = reader.readInt64();

  // Construct [BadServerSalt] object.
  final returnValue = BadServerSalt(
    badMsgId: badMsgId,
    badMsgSeqno: badMsgSeqno,
    errorCode: errorCode,
    newServerSalt: newServerSalt,
  );

  // Now return the deserialized [BadServerSalt].
  return returnValue;
}