github.com/decred/dcrlnd@v0.7.6/watchtower/wtwire/delete_session.go (about)

     1  package wtwire
     2  
     3  import "io"
     4  
     5  // DeleteSession is sent from the client to the tower to signal that the tower
     6  // can delete all session state for the session key used to authenticate the
     7  // brontide connection. This should be done by the client once all channels that
     8  // have state updates in the session have been resolved on-chain.
     9  type DeleteSession struct{}
    10  
    11  // Compile-time constraint to ensure DeleteSession implements the wtwire.Message
    12  // interface.
    13  var _ Message = (*DeleteSession)(nil)
    14  
    15  // Decode deserializes a serialized DeleteSession message stored in the passed
    16  // io.Reader observing the specified protocol version.
    17  //
    18  // This is part of the wtwire.Message interface.
    19  func (m *DeleteSession) Decode(r io.Reader, pver uint32) error {
    20  	return nil
    21  }
    22  
    23  // Encode serializes the target DeleteSession message into the passed io.Writer
    24  // observing the specified protocol version.
    25  //
    26  // This is part of the wtwire.Message interface.
    27  func (m *DeleteSession) Encode(w io.Writer, pver uint32) error {
    28  	return nil
    29  }
    30  
    31  // MsgType returns the integer uniquely identifying this message type on the
    32  // wire.
    33  //
    34  // This is part of the wtwire.Message interface.
    35  func (m *DeleteSession) MsgType() MessageType {
    36  	return MsgDeleteSession
    37  }
    38  
    39  // MaxPayloadLength returns the maximum allowed payload size for a DeleteSession
    40  // message observing the specified protocol version.
    41  //
    42  // This is part of the wtwire.Message interface.
    43  func (m *DeleteSession) MaxPayloadLength(uint32) uint32 {
    44  	return 0
    45  }