From d1c816660c0583db33d160e2ef3e980bef0d5a85 Mon Sep 17 00:00:00 2001 From: hozan23 Date: Mon, 27 May 2024 00:59:23 +0200 Subject: p2p: WIP rpc server implementation for the p2p monitor --- p2p/examples/chat.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'p2p/examples/chat.rs') diff --git a/p2p/examples/chat.rs b/p2p/examples/chat.rs index d120f50..d162371 100644 --- a/p2p/examples/chat.rs +++ b/p2p/examples/chat.rs @@ -11,7 +11,7 @@ use karyon_p2p::{ endpoint::{Endpoint, Port}, keypair::{KeyPair, KeyPairType}, protocol::{ArcProtocol, Protocol, ProtocolEvent, ProtocolID}, - ArcPeer, Backend, Config, P2pError, Version, + ArcPeer, Backend, Config, Error, Version, }; use shared::run_executor; @@ -58,7 +58,7 @@ impl ChatProtocol { #[async_trait] impl Protocol for ChatProtocol { - async fn start(self: Arc) -> Result<(), P2pError> { + async fn start(self: Arc) -> Result<(), Error> { let selfc = self.clone(); let stdin = io::stdin(); let task = self.executor.spawn(async move { @@ -90,7 +90,7 @@ impl Protocol for ChatProtocol { Ok(()) } - fn version() -> Result { + fn version() -> Result { "0.1.0, 0.1.0".parse() } -- cgit v1.2.3