feat(matchmake): a bunch of things
This commit is contained in:
parent
2443569861
commit
7d24a71f09
13 changed files with 220 additions and 30 deletions
|
|
@ -5,7 +5,7 @@ use log::error;
|
|||
use crate::endianness::{IS_BIG_ENDIAN, ReadExtensions};
|
||||
use crate::rmc::response::{ErrorCode, RMCResponseResult};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct RMCMessage{
|
||||
pub protocol_id: u16,
|
||||
pub call_id: u32,
|
||||
|
|
@ -60,13 +60,15 @@ impl RMCMessage{
|
|||
|
||||
output.write_all(bytes_of(&size)).expect("unable to write size");
|
||||
|
||||
let proto_id = self.protocol_id as u8;
|
||||
let proto_id = self.protocol_id as u8 | 0x80;
|
||||
|
||||
output.write_all(bytes_of(&proto_id)).expect("unable to write size");
|
||||
|
||||
output.write_all(bytes_of(&self.call_id)).expect("unable to write size");
|
||||
output.write_all(bytes_of(&self.method_id)).expect("unable to write size");
|
||||
|
||||
output.write_all(&self.rest_of_data).expect("unable to write data");
|
||||
|
||||
output
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ pub async fn send_response(original_packet: &PRUDPPacket, socket: &SocketData, c
|
|||
packet.header.types_and_flags.set_types(DATA);
|
||||
packet.header.types_and_flags.set_flag((original_packet.header.types_and_flags.get_flags() & RELIABLE) | NEED_ACK);
|
||||
|
||||
packet.header.session_id = active_connection.server_session_id;
|
||||
//packet.header.session_id = active_connection.server_session_id;
|
||||
packet.header.substream_id = 0;
|
||||
|
||||
packet.options.push(FragmentId(0));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue