I’m working on a project where I need to enable a single node in my Swarm network to dial a specific peer ID and efficiently send data to another node on the network. However, I’ve encountered an issue where I can’t use libp2p stream because the libp2p_stream::Behaviour doesn’t implement Network behaviour.
Given this constraint, what are the best practices or alternative approaches to achieve both request-response and stream setups within libp2p? I want to ensure that the communication remains efficient and secure while allowing seamless data transfer between nodes.
Any insights or code examples demonstrating how to set up this type of direct peer-to-peer communication in libp2p would be greatly appreciated. Thank you!