Group modules used to build Connection

This commit is contained in:
Dirkjan Ochtman
2020-04-21 21:50:17 +02:00
committed by Benjamin Saunders
parent 349925bd95
commit 2541e56961
7 changed files with 17 additions and 15 deletions
@@ -24,15 +24,25 @@ use crate::{
ConnectionEvent, ConnectionEventInner, ConnectionId, EcnCodepoint, EndpointConfig,
EndpointEvent, EndpointEventInner, IssuedCid, ServerConfig, TransportConfig,
},
spaces::{CryptoSpace, PacketSpace, Retransmits, SentPacket},
streams::{self, FinishError, ReadError, Streams, UnknownStream, WriteError},
timer::{Timer, TimerTable},
transport_parameters::{self, TransportParameters},
Dir, Frame, Side, StreamId, Transmit, TransportError, TransportErrorCode, VarInt,
LOC_CID_COUNT, MAX_STREAM_COUNT, MIN_INITIAL_SIZE, MIN_MTU, RESET_TOKEN_SIZE,
TIMER_GRANULARITY,
};
mod assembler;
mod send_buffer;
mod spaces;
use spaces::{CryptoSpace, PacketSpace, Retransmits, SentPacket};
mod streams;
use streams::Streams;
pub use streams::{FinishError, ReadError, UnknownStream, WriteError};
mod timer;
use timer::{Timer, TimerTable};
/// Protocol state and logic for a single QUIC connection
///
/// Objects of this type receive `ConnectionEvent`s and emit `EndpointEvents` and application
@@ -5,9 +5,8 @@ use std::{
time::Instant,
};
use crate::{
assembler::Assembler, crypto, frame, range_set::RangeSet, shared::IssuedCid, StreamId, VarInt,
};
use super::assembler::Assembler;
use crate::{crypto, frame, range_set::RangeSet, shared::IssuedCid, StreamId, VarInt};
pub(crate) struct PacketSpace<K>
where
@@ -4,11 +4,10 @@ use bytes::{BufMut, Bytes};
use err_derive::Error;
use tracing::{debug, trace};
use super::{assembler::Assembler, send_buffer::SendBuffer};
use crate::{
assembler::Assembler,
frame::{self, FrameStruct},
range_set::RangeSet,
send_buffer::SendBuffer,
transport_parameters::TransportParameters,
Dir, Side, StreamId, TransportError, VarInt,
};
+1 -7
View File
@@ -20,18 +20,14 @@
use std::{fmt, net::SocketAddr, ops, time::Duration};
mod assembler;
mod cid_queue;
#[doc(hidden)]
pub mod coding;
mod constant_time;
mod packet;
mod range_set;
mod send_buffer;
mod spaces;
#[cfg(all(test, feature = "rustls"))]
mod tests;
mod timer;
pub mod transport_parameters;
mod varint;
@@ -39,6 +35,7 @@ pub use varint::{VarInt, VarIntBoundsExceeded};
mod connection;
pub use crate::connection::{ConnectionError, Event, SendDatagramError};
pub use crate::connection::{FinishError, ReadError, UnknownStream, WriteError};
pub mod crypto;
#[cfg(feature = "rustls")]
@@ -56,9 +53,6 @@ pub use crate::shared::{
ConfigError, ConnectionEvent, ConnectionId, EcnCodepoint, EndpointEvent, TransportConfig,
};
mod streams;
pub use crate::streams::{FinishError, ReadError, UnknownStream, WriteError};
mod transport_error;
pub use crate::transport_error::{Code as TransportErrorCode, Error as TransportError};