Skip to main content

Crate po_node

Crate po_node 

Source
Expand description

Complete PO node with discovery, connection management, and high-level API.

§Quick Start

use po_node::Po;

#[tokio::main]
async fn main() {
    // Start a node (listen + discover)
    let mut node = Po::bind(4433).await.unwrap();

    // Or connect to a specific peer
    let mut node = Po::connect("192.168.1.5:4433").await.unwrap();

    // Send data
    node.send(b"Hello!").await.unwrap();

    // Receive data
    let data = node.recv().await.unwrap();
}

Re-exports§

pub use discovery::Discovery;
pub use node::Po;
pub use peer::PeerInfo;

Modules§

discovery
UDP broadcast-based peer discovery for LAN environments.
node
High-level PO node — the “ridiculously easy” API.
peer
Peer information and registry.