pub struct DefaultServerConnectionHandler;Expand description
Server connection handler that produces a fresh random identity for each handshake,
returns no server initial data, and checks the client version against CARGO_PKG_VERSION.
Trait Implementations§
Source§impl ServerConnectionHandler<StaticByteBuffer> for DefaultServerConnectionHandler
impl ServerConnectionHandler<StaticByteBuffer> for DefaultServerConnectionHandler
Source§fn generate(&self, _initial_data: &[u8]) -> StaticByteBuffer
fn generate(&self, _initial_data: &[u8]) -> StaticByteBuffer
Derive a client session identity from the client’s decrypted initial data bytes.
Source§fn initial_data(&self, _identity: &StaticByteBuffer) -> StaticByteBuffer
fn initial_data(&self, _identity: &StaticByteBuffer) -> StaticByteBuffer
Produce initial data to include in the server handshake response for the given identity.
Source§fn verify_version(&self, version_bytes: &[u8]) -> bool
fn verify_version(&self, version_bytes: &[u8]) -> bool
Check whether the client version (from the handshake tailer ID field) is compatible.
Returns
true if the handshake should proceed, false if it should be rejected.
Implementations are responsible for any logging before returning.Auto Trait Implementations§
impl Freeze for DefaultServerConnectionHandler
impl RefUnwindSafe for DefaultServerConnectionHandler
impl Send for DefaultServerConnectionHandler
impl Sync for DefaultServerConnectionHandler
impl Unpin for DefaultServerConnectionHandler
impl UnsafeUnpin for DefaultServerConnectionHandler
impl UnwindSafe for DefaultServerConnectionHandler
Blanket Implementations§
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