|
|
@@ -299,7 +299,10 @@ impl SerializedMessage {
|
|
|
/// Handshake between client and server (peers do not use).
|
|
|
#[derive(Eq, Hash, PartialEq)]
|
|
|
pub struct Handshake {
|
|
|
+ /// Who is sending this handshake.
|
|
|
pub sender: String,
|
|
|
+ /// For normal messages, the group the message was sent to.
|
|
|
+ /// For receipts, the client the receipt is for.
|
|
|
pub group: String,
|
|
|
}
|
|
|
|
|
|
@@ -319,6 +322,7 @@ pub async fn get_handshake<T: AsyncReadExt + std::marker::Unpin>(
|
|
|
Ok(Handshake { sender, group })
|
|
|
}
|
|
|
|
|
|
+/// A reference to a Handshake's fields.
|
|
|
pub struct HandshakeRef<'a> {
|
|
|
pub sender: &'a str,
|
|
|
pub group: &'a str,
|