pub struct Client(_);Expand description
Http2 client
Implementations§
source§impl Client
impl Client
sourcepub async fn send_request(
&self,
method: Method,
path: ByteString,
headers: HeaderMap,
eof: bool
) -> Result<Stream, OperationError>
pub async fn send_request(
&self,
method: Method,
path: ByteString,
headers: HeaderMap,
eof: bool
) -> Result<Stream, OperationError>
Send request to the peer
sourcepub fn is_ready(&self) -> bool
pub fn is_ready(&self) -> bool
Check if client is allowed to send new request
Readiness depends on number of opened streams and max concurrency setting
sourcepub async fn ready(&self) -> Result<(), OperationError>
pub async fn ready(&self) -> Result<(), OperationError>
Check client readiness
Client is ready when it is possible to start new stream
sourcepub fn force_close(&self)
pub fn force_close(&self)
Close connection
sourcepub fn on_disconnect(&self) -> OnDisconnect
pub fn on_disconnect(&self) -> OnDisconnect
Notify when connection get closed