aboutsummaryrefslogtreecommitdiff
path: root/src/client.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.rs')
-rw-r--r--src/client.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client.rs b/src/client.rs
index ab8fc2a..7e5680b 100644
--- a/src/client.rs
+++ b/src/client.rs
@@ -330,6 +330,16 @@ impl Connection {
}
}
+ /// Set the default channel
+ pub fn set_default_channel(&mut self, channel_id: ChannelId) {
+ self.default_channel = Some(channel_id);
+ }
+
+ /// Get the default Channel Id
+ pub fn get_default_channel(&self) -> Option<ChannelId> {
+ self.default_channel
+ }
+
fn create_channel(&mut self, channel_id: ChannelId) -> Result<ChannelId, QuinnetError> {
let (bytes_to_channel_send, bytes_to_channel_recv) =
mpsc::channel::<Bytes>(DEFAULT_MESSAGE_QUEUE_SIZE);