aboutsummaryrefslogtreecommitdiff
path: root/src/shared.rs
diff options
context:
space:
mode:
authorgilles henaux <gill.henaux@gmail.com>2022-12-26 13:33:19 +0100
committergilles henaux <gill.henaux@gmail.com>2023-01-11 14:12:22 +0100
commitf2a5c6b85556d4c5af057b9dd2fed445416d209b (patch)
tree0d1a93bef10ba6274a5bf267aef7fea4e1a0ddea /src/shared.rs
parenta5921d1dd7526ed02605837b1079dc9c4934febe (diff)
[channels] Continue implementation
Diffstat (limited to 'src/shared.rs')
-rw-r--r--src/shared.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared.rs b/src/shared.rs
index 608bb0c..4c5ae65 100644
--- a/src/shared.rs
+++ b/src/shared.rs
@@ -10,6 +10,7 @@ pub const DEFAULT_KILL_MESSAGE_QUEUE_SIZE: usize = 10;
pub const DEFAULT_KEEP_ALIVE_INTERVAL_S: u64 = 4;
pub type ClientId = u64;
+pub type ChannelId = u64;
#[derive(Resource, Deref, DerefMut)]
pub(crate) struct AsyncRuntime(pub(crate) Runtime);
@@ -27,6 +28,8 @@ pub enum QuinnetError {
UnknownConnection(ConnectionId),
#[error("Connection is closed")]
ConnectionClosed,
+ #[error("Channel with id `{0}` is unknown")]
+ UnknownChannel(ChannelId),
#[error("Endpoint is already closed")]
EndpointAlreadyClosed,
#[error("Failed serialization")]