mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-08 08:13:08 +00:00
19 lines
422 B
Rust
19 lines
422 B
Rust
use crate::{
|
|
network_protocol::{HandshakeFailedReason, PeerAddr},
|
|
tcp::Connection,
|
|
};
|
|
|
|
#[derive(Debug)]
|
|
/// Structure, which stores all of the peer interaction data.
|
|
/// Created at per-peer connection basis at `PeerManager`
|
|
pub struct Peer {
|
|
pub connection: Connection,
|
|
pub peer_addr: PeerAddr,
|
|
}
|
|
|
|
impl Peer {
|
|
pub fn handshake(&mut self) -> Result<(), HandshakeFailedReason> {
|
|
todo!();
|
|
}
|
|
}
|