Bluefin
is an experimental, P2P, transport-layer protocol.
```rust use bluefin::hosts::pack_leader::BluefinPackLeaderBuilder;
async fn main() { // Bind and construct a pack-leader over an TUN device let mut packleader = BluefinPackLeaderBuilder::builder() .name("utun3".tostring()) .bindaddress("192.168.55.2".tostring()) .netmask("255.255.255.0".tostring()) .sourceid([1, 3, 1, 8]) .build();
loop {
let mut buf = vec![0; 1504];
let connection_res = pack_leader.accept(&mut buf).await;
tokio::spawn(async move {
match connection_res {
Ok(mut conn) => conn.process().await,
Err(err) => eprintln!("\nConnection attempt failed: {:?}", err),
}
});
}
} ```