ACTUALLY define the protocol
thanks maple for helping out
This commit is contained in:
parent
f020ed8634
commit
3a4eb78d2c
2 changed files with 6 additions and 16 deletions
|
|
@ -5,24 +5,12 @@ use std::sync::{Weak};
|
|||
use rnex_core::PID;
|
||||
use rnex_core::nex::remote_console::RemoteConsole;
|
||||
use rnex_core::rmc::response::ErrorCode;
|
||||
use rnex_core::rmc::protocols::secure::{Secure, RawSecure, RawSecureInfo, RemoteSecure};
|
||||
use rnex_core::rmc::protocols::datastore::{GetMetaInfo, GetMetaParam};
|
||||
use rnex_core::rmc::protocols::datastore::{DataStore, RawDataStore, RawDataStoreInfo, RemoteDataStore};
|
||||
use crate::nex::user::User;
|
||||
|
||||
define_rmc_proto!(
|
||||
proto DataStoreUser {
|
||||
DataStore
|
||||
}
|
||||
);
|
||||
|
||||
#[rmc_struct(DataStoreUser)]
|
||||
pub struct DataStoreUser {
|
||||
pub pid: PID,
|
||||
pub ip: PRUDPSockAddr,
|
||||
pub this: Weak<DataStoreUser>,
|
||||
pub remote: RemoteConsole,
|
||||
}
|
||||
|
||||
impl DataStore for DataStoreUser {
|
||||
impl DataStore for User {
|
||||
async fn get_meta(&self, metaparam: GetMetaParam) -> Result<GetMetaInfo, ErrorCode> {
|
||||
// // bogus
|
||||
// let info: GetMetaInfo = GetMetaInfo {
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ use rnex_core::rmc::protocols::matchmake_extension::{
|
|||
};
|
||||
use rnex_core::rmc::protocols::ranking::{Ranking, RawRanking, RawRankingInfo, RemoteRanking};
|
||||
use rnex_core::rmc::protocols::secure::{RawSecure, RawSecureInfo, RemoteSecure, Secure};
|
||||
use rnex_core::rmc::protocols::datastore::{DataStore, RawDataStore, RawDataStoreInfo, RemoteDataStore};
|
||||
use rnex_core::rmc::response::ErrorCode;
|
||||
use rnex_core::rmc::structures::any::Any;
|
||||
use rnex_core::rmc::structures::matchmake::{
|
||||
|
|
@ -51,7 +52,8 @@ define_rmc_proto!(
|
|||
MatchmakeExt,
|
||||
Matchmake,
|
||||
NatTraversal,
|
||||
Ranking
|
||||
Ranking,
|
||||
DataStore
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue