Struct soketto::handshake::client::Client [−][src]
Websocket client handshake.
Implementations
impl<'a, T: AsyncRead + AsyncWrite + Unpin> Client<'a, T>
[src]
pub fn new(socket: T, host: &'a str, resource: &'a str) -> Self
[src]
Create a new client handshake for some host and resource.
pub fn set_buffer(&mut self, b: BytesMut) -> &mut Self
[src]
Override the buffer to use for request/response handling.
pub fn take_buffer(&mut self) -> BytesMut
[src]
Extract the buffer.
pub fn set_origin(&mut self, o: &'a str) -> &mut Self
[src]
Set the handshake origin header.
pub fn add_protocol(&mut self, p: &'a str) -> &mut Self
[src]
Add a protocol to be included in the handshake.
pub fn add_extension(&mut self, e: Box<dyn Extension + Send>) -> &mut Self
[src]
Add an extension to be included in the handshake.
pub fn drain_extensions(
&mut self
) -> impl Iterator<Item = Box<dyn Extension + Send>> + '_
[src]
&mut self
) -> impl Iterator<Item = Box<dyn Extension + Send>> + '_
Get back all extensions.
pub async fn handshake(&mut self) -> Result<ServerResponse, Error>
[src]
Initiate client handshake request to server and get back the response.
pub fn into_builder(self) -> Builder<T>
[src]
Turn this handshake into a connection::Builder
.
pub fn into_inner(self) -> T
[src]
Get out the inner socket of the client.
Trait Implementations
Auto Trait Implementations
impl<'a, T> !RefUnwindSafe for Client<'a, T>
impl<'a, T> Send for Client<'a, T> where
T: Send,
T: Send,
impl<'a, T> !Sync for Client<'a, T>
impl<'a, T> Unpin for Client<'a, T> where
T: Unpin,
T: Unpin,
impl<'a, T> !UnwindSafe for Client<'a, T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,