Trait Socket
Source pub trait Socket:
Debug
+ Send
+ Sync
+ 'static {
Show 14 methods
// Required methods
fn init<'life0, 'async_trait>(
&'life0 self,
kit: Kit,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_socket_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_established(&self) -> &Event;
fn get_connected(&self) -> &Event;
fn add_subscription<'life0, 'async_trait>(
&'life0 self,
subscription: Arc<Subscription>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn remove_subscription<'life0, 'async_trait>(
&'life0 self,
subscription: Arc<Subscription>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_subscription<'life0, 'async_trait>(
&'life0 self,
channel: String,
) -> Pin<Box<dyn Future<Output = Option<Arc<Subscription>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send<'life0, 'async_trait>(
&'life0 self,
data: String,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn connect_ref<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn connect<'async_trait>(
self,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait;
fn reconnect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn ping_pong<'async_trait>(
self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait;
fn call_later_pong<'async_trait>(
self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait;
fn start_ping_pong_task(&self);
}