Commit 08271673 authored by Nick Mathewson's avatar Nick Mathewson 🥔
Browse files

tor-cell: Add accessors for Begin.

parent 0ed0b793
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -200,6 +200,21 @@ impl Begin {
            flags: flags.into(),
        })
    }

    /// Return the address requested in this message.
    pub fn addr(&self) -> &[u8] {
        &self.addr[..]
    }

    /// Return the port requested by this message.
    pub fn port(&self) -> u16 {
        self.port
    }

    /// Return the set of flags provided in this message.
    pub fn flags(&self) -> BeginFlags {
        self.flags
    }
}

impl Body for Begin {