pub struct WebSocketConnector { /* private fields */ }Expand description
Connects WebSockets using the outbound proxy policy resolved by application configuration.
Construct this from the effective HttpClientFactory rather than selecting proxy behavior at
individual call sites. Each connection resolves its destination through that factory before
opening a socket.
Implementations§
Source§impl WebSocketConnector
impl WebSocketConnector
Sourcepub fn new(
http_client_factory: &HttpClientFactory,
) -> Result<Self, BuildCustomCaTransportError>
pub fn new( http_client_factory: &HttpClientFactory, ) -> Result<Self, BuildCustomCaTransportError>
Creates a connector using native roots and any configured Codex custom CA bundle.
Sourcepub async fn connect(
&self,
request: Request,
config: WebSocketConfig,
) -> Result<(WebSocketConnection, Response), WebSocketError>
pub async fn connect( &self, request: Request, config: WebSocketConfig, ) -> Result<(WebSocketConnection, Response), WebSocketError>
Connects a WebSocket after resolving the request destination through the configured proxy policy.
Trait Implementations§
Source§impl Clone for WebSocketConnector
impl Clone for WebSocketConnector
Source§fn clone(&self) -> WebSocketConnector
fn clone(&self) -> WebSocketConnector
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for WebSocketConnector
impl !UnwindSafe for WebSocketConnector
impl Freeze for WebSocketConnector
impl Send for WebSocketConnector
impl Sync for WebSocketConnector
impl Unpin for WebSocketConnector
impl UnsafeUnpin for WebSocketConnector
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