db working, reorganize minecraft socket code

This commit is contained in:
2026-05-30 00:31:12 +02:00
parent 6e7285507d
commit 2303f06fea
14 changed files with 381 additions and 314 deletions

View File

@ -1,10 +1,12 @@
use crate::minecraft::client::Client;
use crate::minecraft::client::client::Client;
use tokio::net::TcpStream;
pub async fn process_mc_socket(stream: TcpStream) -> Result<(), String> {
use crate::DbPool;
pub async fn process_mc_socket(stream: TcpStream, pool: DbPool) -> Result<(), String> {
println!("new client {:?}", stream);
let mut client = Client::create(stream);
let mut client = Client::create(stream, pool);
loop {
tokio::select! {