Struct holochain_websocket::WebsocketReceiver
source · pub struct WebsocketReceiver(/* private fields */);
Expand description
Receive signals and requests from a websocket connection. Note, This receiver must be polled (recv()) for responses to requests made on the Sender side to be received. If this receiver is dropped, the sender side will also be closed.
Implementations§
source§impl WebsocketReceiver
impl WebsocketReceiver
sourcepub fn peer_addr(&self) -> SocketAddr
pub fn peer_addr(&self) -> SocketAddr
Peer address.
sourcepub async fn recv<D>(&mut self) -> Result<ReceiveMessage<D>>
pub async fn recv<D>(&mut self) -> Result<ReceiveMessage<D>>
Receive the next message.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WebsocketReceiver
impl RefUnwindSafe for WebsocketReceiver
impl Send for WebsocketReceiver
impl Sync for WebsocketReceiver
impl Unpin for WebsocketReceiver
impl UnwindSafe for WebsocketReceiver
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