feat(account): add grpc to communicate with account server

This commit is contained in:
DJMrTV 2025-02-02 00:46:04 +01:00
commit cb6a6f9028
15 changed files with 797 additions and 30 deletions

View file

@ -7,11 +7,11 @@ use crate::rmc::response::{ErrorCode, RMCResponseResult};
use crate::rmc::structures::any::Any;
use crate::rmc::structures::RmcSerialize;
pub fn login(rmcmessage: &RMCMessage, name: &str) -> RMCResponseResult{
pub async fn login(rmcmessage: &RMCMessage, name: &str) -> RMCResponseResult{
rmcmessage.error_result_with_code(ErrorCode::Core_NotImplemented)
}
pub fn login_raw_params(rmcmessage: &RMCMessage, account: &Account) -> RMCResponseResult{
pub async fn login_raw_params(rmcmessage: &RMCMessage, data: (&Account)) -> RMCResponseResult{
let mut reader = Cursor::new(&rmcmessage.rest_of_data);
let Ok(str) = String::deserialize(&mut reader) else {
@ -20,5 +20,5 @@ pub fn login_raw_params(rmcmessage: &RMCMessage, account: &Account) -> RMCRespon
};
login(rmcmessage, &str)
login(rmcmessage, &str).await
}