Struct holochain_websocket::WebsocketListener
source · pub struct WebsocketListener { /* private fields */ }
Expand description
A Holochain websocket listener.
Implementations§
source§impl WebsocketListener
impl WebsocketListener
sourcepub async fn bind<A: ToSocketAddrs>(
config: Arc<WebsocketConfig>,
addr: A
) -> Result<Self>
pub async fn bind<A: ToSocketAddrs>( config: Arc<WebsocketConfig>, addr: A ) -> Result<Self>
Bind a new websocket listener.
sourcepub fn local_addr(&self) -> Result<SocketAddr>
pub fn local_addr(&self) -> Result<SocketAddr>
Get the bound local address of this listener.
sourcepub async fn accept(&self) -> Result<(WebsocketSender, WebsocketReceiver)>
pub async fn accept(&self) -> Result<(WebsocketSender, WebsocketReceiver)>
Accept an incoming connection.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for WebsocketListener
impl Send for WebsocketListener
impl Sync for WebsocketListener
impl Unpin for WebsocketListener
impl UnwindSafe for WebsocketListener
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