pub struct ReverseConnectionSource { /* private fields */ }Expand description
Connection source for a reverse connection. When using this, the server will initiate the connection to the client.
Implementations§
Source§impl ReverseConnectionSource
impl ReverseConnectionSource
Sourcepub fn new_listener(listener: Arc<TcpListener>) -> Self
pub fn new_listener(listener: Arc<TcpListener>) -> Self
Create a new reverse connection source with a TCP listener.
Sourcepub fn new_address(address: SocketAddr) -> Self
pub fn new_address(address: SocketAddr) -> Self
Create a new reverse connection source listening on the given address.
Sourcepub fn with_verifier(
self,
verifier: impl ReverseHelloVerifier + Send + Sync + 'static,
) -> Self
pub fn with_verifier( self, verifier: impl ReverseHelloVerifier + Send + Sync + 'static, ) -> Self
Set a custom verifier for the reverse connection source. If not set, the default verifier will be used, which simply compares the endpoint URL with the configured endpoint URL.
Trait Implementations§
Source§impl ConnectionSource for ReverseConnectionSource
impl ConnectionSource for ReverseConnectionSource
Source§type Builder = ReverseTcpConnector
type Builder = ReverseTcpConnector
The type of connector builder returned by this connection source.
Source§fn get_connector(
&self,
endpoint: &EndpointDescription,
) -> Result<Self::Builder, Error>
fn get_connector( &self, endpoint: &EndpointDescription, ) -> Result<Self::Builder, Error>
Get a connector builder for the given endpoint description.
Auto Trait Implementations§
impl Freeze for ReverseConnectionSource
impl !RefUnwindSafe for ReverseConnectionSource
impl Send for ReverseConnectionSource
impl Sync for ReverseConnectionSource
impl Unpin for ReverseConnectionSource
impl !UnwindSafe for ReverseConnectionSource
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