diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client.rs | 5 | ||||
-rw-r--r-- | src/client/connection.rs | 7 | ||||
-rw-r--r-- | src/shared.rs | 1 |
3 files changed, 7 insertions, 6 deletions
diff --git a/src/client.rs b/src/client.rs index 0efe051..38176d0 100644 --- a/src/client.rs +++ b/src/client.rs @@ -20,7 +20,8 @@ use tokio::{ use crate::shared::{ channel::{ChannelAsyncMessage, ChannelId, ChannelSyncMessage, ChannelType}, - AsyncRuntime, QuinnetError, DEFAULT_KILL_MESSAGE_QUEUE_SIZE, DEFAULT_MESSAGE_QUEUE_SIZE, + AsyncRuntime, InternalConnectionRef, QuinnetError, DEFAULT_KILL_MESSAGE_QUEUE_SIZE, + DEFAULT_MESSAGE_QUEUE_SIZE, }; use self::{ @@ -30,7 +31,7 @@ use self::{ }, connection::{ connection_task, Connection, ConnectionConfiguration, ConnectionEvent, ConnectionId, - ConnectionLostEvent, ConnectionState, InternalConnectionRef, + ConnectionLostEvent, ConnectionState, }, }; diff --git a/src/client/connection.rs b/src/client/connection.rs index ed99517..3deda1f 100644 --- a/src/client/connection.rs +++ b/src/client/connection.rs @@ -2,7 +2,7 @@ use std::{collections::HashMap, error::Error, net::SocketAddr, sync::Arc}; use bevy::prelude::{error, info}; use bytes::Bytes; -use quinn::{ClientConfig, Connection as QuinnConnection, Endpoint}; +use quinn::{ClientConfig, Endpoint}; use quinn_proto::ConnectionStats; use serde::Deserialize; @@ -19,7 +19,8 @@ use crate::shared::{ channels_task, get_channel_id_from_type, reliable_receiver_task, unreliable_receiver_task, Channel, ChannelAsyncMessage, ChannelId, ChannelSyncMessage, ChannelType, MultiChannelId, }, - QuinnetError, DEFAULT_KILL_MESSAGE_QUEUE_SIZE, DEFAULT_MESSAGE_QUEUE_SIZE, + InternalConnectionRef, QuinnetError, DEFAULT_KILL_MESSAGE_QUEUE_SIZE, + DEFAULT_MESSAGE_QUEUE_SIZE, }; use super::{ @@ -86,8 +87,6 @@ impl ConnectionConfiguration { } } -pub(crate) type InternalConnectionRef = QuinnConnection; - /// Current state of a client connection #[derive(Debug)] pub(crate) enum ConnectionState { diff --git a/src/shared.rs b/src/shared.rs index 2fdbf4c..bb8bd09 100644 --- a/src/shared.rs +++ b/src/shared.rs @@ -17,6 +17,7 @@ pub mod channel; #[derive(Resource, Deref, DerefMut)] pub(crate) struct AsyncRuntime(pub(crate) Runtime); +pub(crate) type InternalConnectionRef = quinn::Connection; /// Enum with possibles errors that can occur in Bevy Quinnet #[derive(thiserror::Error, Debug)] |