aboutsummaryrefslogtreecommitdiff
path: root/src/conn.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-12-02 20:12:24 +0100
committerAlex Auvolat <alex@adnab.me>2020-12-02 20:12:24 +0100
commit14d34e76f4007e50af89bd47f6ad36f45494c50a (patch)
treed1a79d397b26f9500917ef5e4eaa6ae70b2d1429 /src/conn.rs
parent46fae5d138cb7c0a74e2a8c7837541f18400ccf4 (diff)
downloadnetapp-14d34e76f4007e50af89bd47f6ad36f45494c50a.tar.gz
netapp-14d34e76f4007e50af89bd47f6ad36f45494c50a.zip
Documentate
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),