pub struct RelayServer<R: ServiceRouter> {
pub endpoint: Endpoint,
server_keypair: Arc<KeyPair>,
router: Arc<R>,
}Expand description
Main relay server that accepts QUIC connections with transport authentication
Fields§
§endpoint: Endpoint§server_keypair: Arc<KeyPair>§router: Arc<R>Implementations§
Source§impl<R: ServiceRouter + 'static> RelayServer<R>
impl<R: ServiceRouter + 'static> RelayServer<R>
pub fn builder() -> RelayServerBuilder
pub fn public_key(&self) -> VerifyingKey
Sourcepub fn new(
addr: SocketAddr,
server_keypair: KeyPair,
router: R,
) -> Result<Self, RelayServerError>
pub fn new( addr: SocketAddr, server_keypair: KeyPair, router: R, ) -> Result<Self, RelayServerError>
Create a new relay server
§Arguments
addr- The address to bind the server toserver_keypair- The server keypair for transport security (Ed25519 or ML-DSA-44)router- The service router implementation
pub fn local_addr(&self) -> Result<SocketAddr>
Auto Trait Implementations§
impl<R> Freeze for RelayServer<R>
impl<R> !RefUnwindSafe for RelayServer<R>
impl<R> Send for RelayServer<R>
impl<R> Sync for RelayServer<R>
impl<R> Unpin for RelayServer<R>
impl<R> !UnwindSafe for RelayServer<R>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more