aboutsummaryrefslogtreecommitdiff
path: root/games/rstnode/rst-core/src/wire/proto/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'games/rstnode/rst-core/src/wire/proto/mod.rs')
-rw-r--r--games/rstnode/rst-core/src/wire/proto/mod.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/games/rstnode/rst-core/src/wire/proto/mod.rs b/games/rstnode/rst-core/src/wire/proto/mod.rs
new file mode 100644
index 000000000000..07598bc85540
--- /dev/null
+++ b/games/rstnode/rst-core/src/wire/proto/mod.rs
@@ -0,0 +1,25 @@
+//! 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!()
+}
+