fix port binding

This commit is contained in:
Maple 2026-03-24 15:48:56 +01:00
commit 785341e883
43 changed files with 1543 additions and 431 deletions

View file

@ -1,16 +1,16 @@
use macros::RmcSerialize;
use rnex_core::PID;
#[derive(RmcSerialize, Clone)]
pub struct Account {
pub pid: u32,
pub pid: PID,
pub username: String,
pub kerbros_password: Box<[u8]>,
}
impl Account {
pub fn new(pid: u32, username: &str, passwd: &str) -> Self {
let passwd_data = passwd.as_bytes();
pub fn new(pid: PID, username: &str, passwd: &str) -> Self {
Self {
kerbros_password: passwd.as_bytes().into(),
username: username.into(),
@ -18,7 +18,7 @@ impl Account {
}
}
pub fn new_raw_password(pid: u32, username: &str, passwd: &[u8]) -> Self {
pub fn new_raw_password(pid: PID, username: &str, passwd: &[u8]) -> Self {
Self {
kerbros_password: passwd.into(),
username: username.into(),
@ -26,7 +26,7 @@ impl Account {
}
}
pub fn get_login_data(&self) -> (u32, &[u8]) {
pub fn get_login_data(&self) -> (PID, &[u8]) {
(self.pid, &self.kerbros_password)
}
}