hopr_lib/traits/session.rs
1#[cfg(feature = "session-server")]
2use crate::{errors::Result, exports::transport::IncomingSession};
3
4/// Interface representing the HOPR server behavior for each incoming session instance
5/// supplied as an argument.
6#[cfg(feature = "session-server")]
7#[async_trait::async_trait]
8pub trait HoprSessionServer {
9 /// Fully process a single HOPR session
10 async fn process(&self, session: IncomingSession) -> Result<()>;
11}