pub struct TransportConnectionWrapper { /* private fields */ }Expand description
A connection around another one that keeps the events raised before a handler is subscribed, and that queues the messages to send so that any number of threads may send at once.
Implementations§
Source§impl TransportConnectionWrapper
impl TransportConnectionWrapper
pub fn new( conn: Arc<dyn IFerroRemoteTransportConnection>, ) -> Arc<TransportConnectionWrapper> ⓘ
Trait Implementations§
Source§impl Drop for TransportConnectionWrapper
impl Drop for TransportConnectionWrapper
Source§impl IFerroRemoteTransportConnection for TransportConnectionWrapper
impl IFerroRemoteTransportConnection for TransportConnectionWrapper
Source§fn send(&self, data: Message) -> Task
fn send(&self, data: Message) -> Task
Queues the message and returns; the task completes when the worker has sent it. Messages are sent in the order they were queued.
Source§fn dispose(&self)
fn dispose(&self)
IDisposable.Dispose: closes the connection. No exception event
follows from the closing itself.Source§fn on_message(&self, handler: MessageHandler) -> HandlerToken
fn on_message(&self, handler: MessageHandler) -> HandlerToken
OnMessage += handler.Source§fn remove_on_message(&self, token: HandlerToken)
fn remove_on_message(&self, token: HandlerToken)
OnMessage -= handler.Source§fn on_exception(&self, handler: ExceptionHandler) -> HandlerToken
fn on_exception(&self, handler: ExceptionHandler) -> HandlerToken
OnException += handler.Source§fn remove_on_exception(&self, token: HandlerToken)
fn remove_on_exception(&self, token: HandlerToken)
OnException -= handler.fn start(&self)
Auto Trait Implementations§
impl !RefUnwindSafe for TransportConnectionWrapper
impl !UnwindSafe for TransportConnectionWrapper
impl Freeze for TransportConnectionWrapper
impl Send for TransportConnectionWrapper
impl Sync for TransportConnectionWrapper
impl Unpin for TransportConnectionWrapper
impl UnsafeUnpin for TransportConnectionWrapper
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