/// Helper function to send outgoing messages.
Helper function to send outgoing messages.
Helper function to send outgoing messages .
fn send_message(
    sink: &mpsc::UnboundedSender<WsMessage>,
    msg: OutgoingMessage,
) -> Result<(), WsError> {
    sink.unbounded_send(msg.into())
        .map_err(|_| WsError::Http(500))
}
fn send_message ( sink : & mpsc :: UnboundedSender < WsMessage > , msg : OutgoingMessage , ) -> Result < ( ) , WsError > { sink . unbounded_send ( msg . into ( ) ) . map_err ( | _ | WsError :: Http ( 500 ) ) }
Helper function to send outgoing messages.
Helper function to send outgoing messages .
sink
&mpsc::UnboundedSender<WsMessage>
msg
OutgoingMessage