wrote server stub
This commit is contained in:
14
server/src/server.rs
Normal file
14
server/src/server.rs
Normal 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}!"))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user