pub struct AsyncSecureChannel { /* private fields */ }
Expand description
Wrapper around an open secure channel
Implementations§
Source§impl AsyncSecureChannel
impl AsyncSecureChannel
Sourcepub fn request_handle(&self) -> IntegerId
pub fn request_handle(&self) -> IntegerId
Get the next request handle on the channel.
Source§impl AsyncSecureChannel
impl AsyncSecureChannel
Sourcepub fn new(
certificate_store: Arc<RwLock<CertificateStore>>,
session_info: SessionInfo,
session_retry_policy: SessionRetryPolicy,
ignore_clock_skew: bool,
auth_token: Arc<ArcSwap<NodeId>>,
transport_config: TransportConfiguration,
connector: Box<dyn Connector>,
channel_lifetime: u32,
encoding_context: Arc<RwLock<ContextOwned>>,
) -> Self
pub fn new( certificate_store: Arc<RwLock<CertificateStore>>, session_info: SessionInfo, session_retry_policy: SessionRetryPolicy, ignore_clock_skew: bool, auth_token: Arc<ArcSwap<NodeId>>, transport_config: TransportConfiguration, connector: Box<dyn Connector>, channel_lifetime: u32, encoding_context: Arc<RwLock<ContextOwned>>, ) -> Self
Create a new client secure channel.
Sourcepub async fn send(
&self,
request: impl Into<RequestMessage>,
timeout: Duration,
) -> Result<ResponseMessage, StatusCode>
pub async fn send( &self, request: impl Into<RequestMessage>, timeout: Duration, ) -> Result<ResponseMessage, StatusCode>
Send a message on the secure channel, and wait for a response.
Sourcepub async fn connect(&self) -> Result<SecureChannelEventLoop, StatusCode>
pub async fn connect(&self) -> Result<SecureChannelEventLoop, StatusCode>
Attempt to establish a connection using this channel, returning an event loop for polling the connection.
Sourcepub async fn connect_no_retry(
&self,
) -> Result<SecureChannelEventLoop, StatusCode>
pub async fn connect_no_retry( &self, ) -> Result<SecureChannelEventLoop, StatusCode>
Connect to the server without attempting to retry if it fails.
Sourcepub async fn close_channel(&self)
pub async fn close_channel(&self)
Close the secure channel, optionally wait for the channel to close.
Auto Trait Implementations§
impl !Freeze for AsyncSecureChannel
impl !RefUnwindSafe for AsyncSecureChannel
impl Send for AsyncSecureChannel
impl Sync for AsyncSecureChannel
impl Unpin for AsyncSecureChannel
impl !UnwindSafe for AsyncSecureChannel
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