pub struct WebSocketSession { /* private fields */ }Implementations§
Source§impl WebSocketSession
impl WebSocketSession
pub fn new( sid: u32, source: String, conn_info: (SocketAddr, SocketAddr), handler: Box<dyn WebSocketRequestHandler>, ) -> Self
pub fn is_valid(&self) -> bool
pub fn requestor(&self) -> &Arc<WebSocketRequestManager>
pub fn sid(&self) -> u32
pub fn conn_info(&self) -> &(SocketAddr, SocketAddr)
pub fn stop(&self)
pub async fn post_msg(&self, msg: Vec<u8>) -> BuckyResult<()>
pub async fn run_client<S>( session: Arc<Self>, service_url: &Url, stream: S, ) -> BuckyResult<()>
pub async fn run_server<S>(session: Arc<Self>, stream: S) -> BuckyResult<()>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for WebSocketSession
impl !RefUnwindSafe for WebSocketSession
impl Send for WebSocketSession
impl Sync for WebSocketSession
impl Unpin for WebSocketSession
impl !UnwindSafe for WebSocketSession
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more