fixed packets not being processed
This commit is contained in:
parent
7582f36795
commit
11d64bd8cd
2 changed files with 13 additions and 4 deletions
7
README.md
Normal file
7
README.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# Splatoon NEX Server in Rust
|
||||
|
||||
## Credits:
|
||||
- Pretendo team for the rest of the Servers and Reverse engineering efforts
|
||||
- Kinnay for his huge work on reversing nex servers and documentation(https://github.com/Kinnay/NintendoClients/)
|
||||
- Splatfestival testing team for helping us test our messes of code
|
||||
- The SPFN team(Andrea and DJMrTV)
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
use std::{env, io, thread};
|
||||
use std::io::Cursor;
|
||||
use std::marker::PhantomData;
|
||||
use std::net::{Ipv4Addr, SocketAddrV4, UdpSocket};
|
||||
use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4, UdpSocket};
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::thread::JoinHandle;
|
||||
use once_cell::sync::Lazy;
|
||||
use log::error;
|
||||
use log::{error, info};
|
||||
use crate::prudp::auth_module::AuthModule;
|
||||
use crate::prudp::endpoint::Endpoint;
|
||||
use crate::prudp::packet::PRUDPPacket;
|
||||
|
|
@ -29,7 +29,7 @@ impl NexServer{
|
|||
fn process_prudp_packet(&self, packet: &PRUDPPacket){
|
||||
|
||||
}
|
||||
fn process_prudp_packets(&self, addr: Ipv4Addr, udp_message: &[u8]){
|
||||
fn process_prudp_packets(&self, addr: SocketAddr, udp_message: &[u8]){
|
||||
let mut stream = Cursor::new(udp_message);
|
||||
|
||||
while stream.position() as usize != udp_message.len() {
|
||||
|
|
@ -41,6 +41,8 @@ impl NexServer{
|
|||
},
|
||||
};
|
||||
|
||||
info!("got valid prudp packet from someone({}): \n{:?}", addr, packet);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -55,7 +57,7 @@ impl NexServer{
|
|||
|
||||
let current_msg = &msg_buffer[0..len];
|
||||
|
||||
|
||||
self.process_prudp_packets(addr, current_msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue