tests for minecraft-server container, save rpc before changing control method
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
/target
|
||||
.env
|
||||
tmp/
|
||||
servers/
|
||||
|
||||
@ -3,3 +3,4 @@ mod socket;
|
||||
pub use socket::process_rpc_socket;
|
||||
|
||||
pub mod actions;
|
||||
pub mod rpc_client;
|
||||
|
||||
17
src/rpc/rpc_client.rs
Normal file
17
src/rpc/rpc_client.rs
Normal file
@ -0,0 +1,17 @@
|
||||
pub struct RpcClient{
|
||||
pub read_buffer: Vec<u8>,
|
||||
pub buffer: Vec<u8>,
|
||||
|
||||
pub close: bool
|
||||
}
|
||||
|
||||
impl RpcClient {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
read_buffer: vec![0; 1024],
|
||||
buffer: vec![0; 10240],
|
||||
|
||||
close: true
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3,6 +3,8 @@ use tokio::net::TcpStream;
|
||||
|
||||
use crate::DbPool;
|
||||
|
||||
use crate::rpc::rpc_client::RpcClient;
|
||||
|
||||
|
||||
/*
|
||||
* request_format :
|
||||
@ -19,5 +21,6 @@ use crate::DbPool;
|
||||
*/
|
||||
|
||||
pub async fn process_rpc_socket(_stream: TcpStream, _pool: DbPool) -> io::Result<()> {
|
||||
panic!("not implemented");
|
||||
let client = RpcClient::new();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user