aboutsummaryrefslogtreecommitdiff
path: root/src/conn.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/conn.rs')
-rw-r--r--src/conn.rs17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/conn.rs b/src/conn.rs
index df3b7cf..7f869e8 100644
--- a/src/conn.rs
+++ b/src/conn.rs
@@ -23,10 +23,12 @@ use crate::netapp::*;
use crate::proto::*;
use crate::util::*;
-pub struct ServerConn {
+pub(crate) struct ServerConn {
+ pub(crate) remote_addr: SocketAddr,
+ pub(crate) peer_pk: ed25519::PublicKey,
+
netapp: Arc<NetApp>,
- pub remote_addr: SocketAddr,
- pub peer_pk: ed25519::PublicKey,
+
resp_send: mpsc::UnboundedSender<(RequestID, RequestPriority, Vec<u8>)>,
close_send: watch::Sender<bool>,
}
@@ -115,10 +117,10 @@ impl RecvLoop for ServerConn {
}
}
}
-pub struct ClientConn {
- pub netapp: Arc<NetApp>,
- pub remote_addr: SocketAddr,
- pub peer_pk: ed25519::PublicKey,
+pub(crate) struct ClientConn {
+ pub(crate) remote_addr: SocketAddr,
+ pub(crate) peer_pk: ed25519::PublicKey,
+
query_send: mpsc::UnboundedSender<(RequestID, RequestPriority, Vec<u8>)>,
next_query_number: AtomicU16,
resp_send: mpsc::UnboundedSender<(RequestID, Vec<u8>)>,
@@ -167,7 +169,6 @@ impl ClientConn {
let (close_send, close_recv) = watch::channel(false);
let conn = Arc::new(ClientConn {
- netapp: netapp.clone(),
remote_addr,
peer_pk: remote_pk.clone(),
next_query_number: AtomicU16::from(0u16),