feat: split rmc off from prudp, make macros crate location independent and add tls connection setup

This commit is contained in:
DJMrTV 2025-06-13 10:05:38 +02:00
commit 9da91bb835
24 changed files with 1218 additions and 420 deletions

View file

@ -0,0 +1,26 @@
use splatoon_server_rust::reggie::RemoteRmcTestProto;
use std::fs;
use std::net::IpAddr;
use std::sync::Arc;
use rustls::ClientConfig;
use rustls_pki_types::ServerName;
use tokio::io::AsyncWriteExt;
use tokio::net::TcpStream;
use tokio_rustls::{TlsConnector, TlsStream};
use splatoon_server_rust::common::setup;
use splatoon_server_rust::reggie::{establish_tls_connection_to, get_configured_tls_connector, RemoteTestProto, UnitPacketWrite};
use splatoon_server_rust::rmc::protocols::{new_rmc_gateway_connection, OnlyRemote};
use splatoon_server_rust::rmc::structures::RmcSerialize;
#[tokio::main]
async fn main(){
setup();
let mut stream
= establish_tls_connection_to("192.168.178.120:2376", "account.spfn.net").await;
let remo = new_rmc_gateway_connection(stream.into(), |r| Arc::new(OnlyRemote::<RemoteTestProto>::new(r)) );
println!("{:?}", remo.test().await);
}