Explorar o código

core API: dispatch

awiouy %!s(int64=7) %!d(string=hai) anos
pai
achega
434b824c6e
Modificáronse 3 ficheiros con 3 adicións e 3 borrados
  1. 1 1
      core/src/audio_key.rs
  2. 1 1
      core/src/channel.rs
  3. 1 1
      core/src/mercury/mod.rs

+ 1 - 1
core/src/audio_key.rs

@@ -22,7 +22,7 @@ component! {
 }
 }
 
 
 impl AudioKeyManager {
 impl AudioKeyManager {
-    pub fn dispatch(&self, cmd: u8, mut data: Bytes) {
+    pub(crate) fn dispatch(&self, cmd: u8, mut data: Bytes) {
         let seq = BigEndian::read_u32(data.split_to(4).as_ref());
         let seq = BigEndian::read_u32(data.split_to(4).as_ref());
 
 
         let sender = self.lock(|inner| inner.pending.remove(&seq));
         let sender = self.lock(|inner| inner.pending.remove(&seq));

+ 1 - 1
core/src/channel.rs

@@ -54,7 +54,7 @@ impl ChannelManager {
         (seq, channel)
         (seq, channel)
     }
     }
 
 
-    pub fn dispatch(&self, cmd: u8, mut data: Bytes) {
+    pub(crate) fn dispatch(&self, cmd: u8, mut data: Bytes) {
         use std::collections::hash_map::Entry;
         use std::collections::hash_map::Entry;
 
 
         let id: u16 = BigEndian::read_u16(data.split_to(2).as_ref());
         let id: u16 = BigEndian::read_u16(data.split_to(2).as_ref());

+ 1 - 1
core/src/mercury/mod.rs

@@ -136,7 +136,7 @@ impl MercuryManager {
         }))
         }))
     }
     }
 
 
-    pub fn dispatch(&self, cmd: u8, mut data: Bytes) {
+    pub(crate) fn dispatch(&self, cmd: u8, mut data: Bytes) {
         let seq_len = BigEndian::read_u16(data.split_to(2).as_ref()) as usize;
         let seq_len = BigEndian::read_u16(data.split_to(2).as_ref()) as usize;
         let seq = data.split_to(seq_len).as_ref().to_owned();
         let seq = data.split_to(seq_len).as_ref().to_owned();