Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Guillaume Depardon Globidev

🎯
Focusing
  • Paris, France
View GitHub Profile
View viewer.rs
pub async fn run(mut self) -> Result<(), Box<dyn std::error::Error>> {
loop {
match select(self.stream.next(), self.channel.next()).await {
Either::Left((Some(Ok(message)), _)) => {
match message {
Message::Text(txt) => {
debug!("[{}] Received message: {:?}", self.uuid, txt);
},
Message::Binary(bin) => {
debug!("[{}] Received binary message: {:?}", self.uuid, bin);