Closed john-bv closed 1 year ago
This issue is a followup for #39
The RFC Allows you to open a RakNet Peer Client to connect to other RakNet instances. This RFC contains the following functions:
Connect to a server instance
Force ACK/NAK flush
Example:
use rakrs::client::Client; async fn connect(address: &'static str) -> Result<(), std::error::Error> { let mut conn = Client::new(&address, 10); conn.open(); loop { let buf = conn.recv().await?; // Send a packet on ordered channel conn.send_ord(&[buf], 0); // Send a packet sequenced conn.send_seq(&[buf], 0); // Send packet reliably (not ord, use send_ord for that) conn.send(&[buf], Reliability::Reliable); } // flush ack and nack forcefully. conn.flush_ack(); conn.close().await?; }
This issue is a followup for #39
The RFC Allows you to open a RakNet Peer Client to connect to other RakNet instances. This RFC contains the following functions:
Connect to a server instance
Force ACK/NAK flush
Example: