netget-tool 0.3.5

Network protocol stubbing toolkit: ~280 protocol servers and clients whose responses come from an LLM, a script, a static rule or a person.
1
2
3
4
5
6
7
8
9
10
pub mod actions;
pub async fn connect(ctx: crate::protocol::ConnectContext) -> anyhow::Result<std::net::SocketAddr> {
    crate::server::p2p_support::connect(
        ctx,
        std::sync::Arc::new(actions::SoulseekPeerClientProtocol),
        crate::server::soulseek_peer::codec::Scanner::default(),
        [&actions::EVENTS[0], &actions::EVENTS[1]],
    )
    .await
}