Struct epicbox::server::AsyncServer [−][src]
pub struct AsyncServer {
id: String,
inner: Arc<Mutex<Server>>,
nats_sender: UnboundedSender<BrokerRequest>,
response_handlers_sender: UnboundedSender<BrokerResponseHandler>,
subscriptions: HashMap<String, Subscription>,
epicbox_domain: String,
epicbox_port: u16,
epicbox_protocol_unsecure: bool,
}Fields
id: Stringinner: Arc<Mutex<Server>>nats_sender: UnboundedSender<BrokerRequest>response_handlers_sender: UnboundedSender<BrokerResponseHandler>subscriptions: HashMap<String, Subscription>epicbox_domain: Stringepicbox_port: u16epicbox_protocol_unsecure: boolImplementations
pub fn new(
out: Sender,
nats_sender: UnboundedSender<BrokerRequest>,
response_handlers_sender: UnboundedSender<BrokerResponseHandler>,
epicbox_domain: &str,
epicbox_port: u16,
epicbox_protocol_unsecure: bool
) -> AsyncServer
Trait Implementations
A method for handling the low-level workings of the request portion of the WebSocket handshake. Read more
Called when the WebSocket handshake is successful and the connection is open for sending and receiving messages. Read more
Called on incoming messages.
Called any time this endpoint receives a close control frame. This may be because the other endpoint is initiating a closing handshake, or it may be the other endpoint confirming the handshake initiated by this endpoint. Read more
fn on_shutdown(&mut self)
fn on_shutdown(&mut self)
Called when a request to shutdown all connections has been received.
fn on_response(&mut self, res: &Response) -> Result<(), Error>
fn on_response(&mut self, res: &Response) -> Result<(), Error>
A method for handling the low-level workings of the response portion of the WebSocket handshake. Read more
fn on_timeout(&mut self, event: Token) -> Result<(), Error>
fn on_timeout(&mut self, event: Token) -> Result<(), Error>
Called when a timeout is triggered. Read more
fn on_new_timeout(&mut self, Token, Timeout) -> Result<(), Error>
fn on_new_timeout(&mut self, Token, Timeout) -> Result<(), Error>
Called when a timeout has been scheduled on the eventloop. Read more
A method for handling incoming frames. Read more
fn on_send_frame(&mut self, frame: Frame) -> Result<Option<Frame>, Error>
fn on_send_frame(&mut self, frame: Frame) -> Result<Option<Frame>, Error>
A method for handling outgoing frames. Read more
fn build_request(&mut self, url: &Url) -> Result<Request, Error>
fn build_request(&mut self, url: &Url) -> Result<Request, Error>
A method for creating the initial handshake request for WebSocket clients. Read more
A method for wrapping a client TcpStream with Ssl Authentication machinery Read more
Auto Trait Implementations
impl !RefUnwindSafe for AsyncServer
impl Send for AsyncServer
impl Sync for AsyncServer
impl Unpin for AsyncServer
impl !UnwindSafe for AsyncServer
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> SafeBorrow<T> for T where
T: ?Sized,
impl<T> SafeBorrow<T> for T where
T: ?Sized,
pub fn borrow_replacement(ptr: &T) -> &T
pub fn borrow_replacement(ptr: &T) -> &T
Given ptr, which was obtained from a prior call to Self::borrow(),
return a value with the same nominal lifetime which is guaranteed to
survive mutations to Self. Read more