Expand description
Synchronous (blocking) wrapper for ForwarderClient.
Useful for non-async contexts such as C FFI or Python bindings where
spawning a Tokio runtime manually is more ergonomic than using async/await.
§Example
use ndn_ipc::BlockingForwarderClient;
use ndn_packet::Name;
let mut client = BlockingForwarderClient::connect("/run/nfd/nfd.sock").unwrap();
let prefix: Name = "/example".parse().unwrap();
client.register_prefix(&prefix).unwrap();
// Send a raw NDN packet.
client.send(bytes::Bytes::from_static(b"\x05\x01\x00")).unwrap();
// Receive a raw NDN packet.
if let Some(pkt) = client.recv() {
println!("received {} bytes", pkt.len());
}Structs§
- Blocking
Forwarder Client - Synchronous (blocking) client for communicating with a running
ndn-fwd.