Skip to content

Commit

Permalink
refactor!: remove bootstrap and reachability
Browse files Browse the repository at this point in the history
  • Loading branch information
b-zee authored and joshuef committed Jan 20, 2023
1 parent 5b2aaac commit b7b4976
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 465 deletions.
4 changes: 2 additions & 2 deletions examples/p2p_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use bytes::Bytes;
use color_eyre::eyre::Result;
use qp2p::{Config, Endpoint};
use qp2p::{Config, Endpoint, WireMsg};
use std::{
env,
net::{Ipv4Addr, SocketAddr},
Expand Down Expand Up @@ -74,7 +74,7 @@ async fn main() -> Result<()> {
let src = connection.remote_address();

// loop over incoming messages
while let Ok(Some((_, _, bytes))) = incoming.next().await {
while let Ok(Some(WireMsg((_, _, bytes)))) = incoming.next().await {
println!("Received from {:?} --> {:?}", src, bytes);
if bytes == *MSG_MARCO {
let reply = Bytes::from(MSG_POLO);
Expand Down
Loading

0 comments on commit b7b4976

Please sign in to comment.