feat: split rmc off from prudp, make macros crate location independent and add tls connection setup
This commit is contained in:
parent
0a1e49d9bc
commit
9da91bb835
24 changed files with 1218 additions and 420 deletions
|
|
@ -189,7 +189,7 @@ pub fn rmc_serialize(input: TokenStream) -> TokenStream {
|
|||
|
||||
quote! {
|
||||
#pre_inner
|
||||
crate::rmc::structures::rmc_struct::write_struct(writer, #version, |mut writer|{
|
||||
splatoon_server_rust::rmc::structures::rmc_struct::write_struct(writer, #version, |mut writer|{
|
||||
#serialize_base_content
|
||||
})?;
|
||||
|
||||
|
|
@ -218,7 +218,7 @@ pub fn rmc_serialize(input: TokenStream) -> TokenStream {
|
|||
|
||||
quote! {
|
||||
#pre_inner
|
||||
Ok(crate::rmc::structures::rmc_struct::read_struct(reader, #version, move |mut reader|{
|
||||
Ok(splatoon_server_rust::rmc::structures::rmc_struct::read_struct(reader, #version, move |mut reader|{
|
||||
#deserialize_base_content
|
||||
})?)
|
||||
}
|
||||
|
|
@ -229,14 +229,14 @@ pub fn rmc_serialize(input: TokenStream) -> TokenStream {
|
|||
let ident = derive_input.ident;
|
||||
|
||||
let tokens = quote! {
|
||||
impl crate::rmc::structures::RmcSerialize for #ident{
|
||||
fn serialize(&self, writer: &mut dyn ::std::io::Write) -> crate::rmc::structures::Result<()>{
|
||||
impl splatoon_server_rust::rmc::structures::RmcSerialize for #ident{
|
||||
fn serialize(&self, writer: &mut dyn ::std::io::Write) -> splatoon_server_rust::rmc::structures::Result<()>{
|
||||
#serialize_base_content
|
||||
|
||||
|
||||
}
|
||||
|
||||
fn deserialize(reader: &mut dyn ::std::io::Read) -> crate::rmc::structures::Result<Self>{
|
||||
fn deserialize(reader: &mut dyn ::std::io::Read) -> splatoon_server_rust::rmc::structures::Result<Self>{
|
||||
#deserialize_base_content
|
||||
}
|
||||
}
|
||||
|
|
@ -367,8 +367,8 @@ pub fn rmc_struct(attr: TokenStream, input: TokenStream) -> TokenStream{
|
|||
|
||||
}
|
||||
|
||||
impl crate::rmc::protocols::RmcCallable for #struct_name{
|
||||
async fn rmc_call(&self, remote_response_connection: &crate::prudp::socket::SendingConnection, protocol_id: u16, method_id: u32, call_id: u32, rest: Vec<u8>){
|
||||
impl splatoon_server_rust::rmc::protocols::RmcCallable for #struct_name{
|
||||
async fn rmc_call(&self, remote_response_connection: &splatoon_server_rust::util::SendingBufferConnection, protocol_id: u16, method_id: u32, call_id: u32, rest: Vec<u8>){
|
||||
<Self as #ident>::rmc_call(self, remote_response_connection, protocol_id, method_id, call_id, rest).await;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue