connection table cleanup

This commit is contained in:
John Smith
2022-09-14 14:36:29 -04:00
parent 72b03939ef
commit 8878817961
13 changed files with 401 additions and 352 deletions

View File

@@ -1507,17 +1507,17 @@ pub struct ConnectionDescriptor {
}
impl ConnectionDescriptor {
pub fn new(remote: PeerAddress, local: SocketAddress) -> Result<Self, VeilidAPIError> {
Ok(Self {
pub fn new(remote: PeerAddress, local: SocketAddress) -> Self {
Self {
remote,
local: Some(local),
})
}
}
pub fn new_no_local(remote: PeerAddress) -> Result<Self, VeilidAPIError> {
Ok(Self {
pub fn new_no_local(remote: PeerAddress) -> Self {
Self {
remote,
local: None,
})
}
}
pub fn remote(&self) -> PeerAddress {
self.remote