NewSessionCreated.deserialize constructor

NewSessionCreated.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory NewSessionCreated.deserialize(BinaryReader reader) {
  // Read [NewSessionCreated] fields.
  final firstMsgId = reader.readInt64();
  final uniqueId = reader.readInt64();
  final serverSalt = reader.readInt64();

  // Construct [NewSessionCreated] object.
  final returnValue = NewSessionCreated(
    firstMsgId: firstMsgId,
    uniqueId: uniqueId,
    serverSalt: serverSalt,
  );

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