diff --git a/msg-socket/src/lib.rs b/msg-socket/src/lib.rs index 9b387a1..901e3d8 100644 --- a/msg-socket/src/lib.rs +++ b/msg-socket/src/lib.rs @@ -8,6 +8,7 @@ mod req; mod sub; mod connection; +pub use connection::*; use bytes::Bytes; pub use pubs::{PubError, PubOptions, PubSocket}; diff --git a/msg-socket/src/req/driver.rs b/msg-socket/src/req/driver.rs index 2690205..f63f365 100644 --- a/msg-socket/src/req/driver.rs +++ b/msg-socket/src/req/driver.rs @@ -17,12 +17,9 @@ use tokio::{ use tokio_util::codec::Framed; use tracing::{debug, error, trace}; -use crate::{ - connection::{ConnectionState, ExponentialBackoff}, - req::SocketState, -}; - use super::{Command, ReqError, ReqOptions}; +use crate::{req::SocketState, ConnectionState, ExponentialBackoff}; + use msg_transport::Transport; use msg_wire::{ auth, diff --git a/msg-socket/src/req/socket.rs b/msg-socket/src/req/socket.rs index 8c84e33..5f47a52 100644 --- a/msg-socket/src/req/socket.rs +++ b/msg-socket/src/req/socket.rs @@ -8,9 +8,10 @@ use tokio::sync::{mpsc, oneshot}; use msg_transport::Transport; use super::{Command, ReqDriver, ReqError, ReqOptions, DEFAULT_BUFFER_SIZE}; -use crate::connection::{ConnectionState, ExponentialBackoff}; -use crate::ReqMessage; -use crate::{req::stats::SocketStats, req::SocketState}; +use crate::{ + req::{stats::SocketStats, SocketState}, + ConnectionState, ExponentialBackoff, ReqMessage, +}; /// The request socket. pub struct ReqSocket { diff --git a/msg-socket/src/sub/driver.rs b/msg-socket/src/sub/driver.rs index e2eaea7..4f6b4c0 100644 --- a/msg-socket/src/sub/driver.rs +++ b/msg-socket/src/sub/driver.rs @@ -12,14 +12,13 @@ use tokio::sync::mpsc::{self, error::TrySendError}; use tokio_util::codec::Framed; use tracing::{debug, error, info, warn}; -use crate::connection::{ConnectionState, ExponentialBackoff}; - use super::session::SessionCommand; use super::{ session::PublisherSession, stream::{PublisherStream, TopicMessage}, Command, PubMessage, SocketState, SubOptions, }; +use crate::{ConnectionState, ExponentialBackoff}; use msg_common::{channel, task::JoinMap, Channel}; use msg_transport::Transport;