]> code.octet-stream.net Git - m17rt/blobdiff - m17app/src/link_setup.rs
Factor out output buffering for KISS sockets
[m17rt] / m17app / src / link_setup.rs
index 007dc78fc3b2338cf6a9cd57734648c6d28856a5..239472505e5c88ee5edef75329424880ea1e2866 100644 (file)
@@ -17,6 +17,14 @@ impl LinkSetup {
         Self { raw: frame }
     }
 
+    pub fn source(&self) -> M17Address {
+        M17Address(self.raw.source())
+    }
+
+    pub fn destination(&self) -> M17Address {
+        M17Address(self.raw.destination())
+    }
+
     /// Set up an unencrypted voice stream with channel access number 0 and the given source and destination.
     pub fn new_voice(source: &M17Address, destination: &M17Address) -> Self {
         Self {
@@ -71,7 +79,7 @@ impl M17Address {
         Ok(Self(Address::Callsign(Callsign(address))))
     }
 
-    pub(crate) fn address(&self) -> &Address {
+    pub fn address(&self) -> &Address {
         &self.0
     }
 }