wrote server stub

This commit is contained in:
2024-06-13 15:42:59 -04:00
Unverified
parent e643b6b8f6
commit caf4c0e6af
6 changed files with 70 additions and 2 deletions

14
server/src/server.rs Normal file
View File

@@ -0,0 +1,14 @@
use std::net::SocketAddr;
use futures::future;
use futures::future::Ready;
use tarpc::context::Context;
use crate::types::RealmChat;
#[derive(Clone)]
pub struct RealmChatServer(pub SocketAddr);
impl RealmChat for RealmChatServer {
fn test(self, context: Context, name: String) -> Ready<String> {
future::ready(format!("Hello, {name}!"))
}
}