My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/games/rstnode/rst-core/src/wire/proto/mod.rs

25 lines
617 B

//! This module implements the client-server game protocol
use super::{Request, Response};
pub enum NetErr {
Refused,
Dropped,
Timeout,
BadData,
}
/// Use this function to send a request to a partical remote
///
/// The function makes sure that you get a valid response back, but
/// does not yet ensure that this response is correct for the request
/// in question.
pub fn request_to(r: Request, remote: String) -> Result<Response, NetErr> {
todo!()
}
/// Use this function to send a response to a client
pub fn response_to(r: Response, client: String) -> Result<(), NetErr> {
todo!()
}