Send binary data.
(&self, data: &[u8])
| 62 | impl WebSocket { |
| 63 | /// Send binary data. |
| 64 | pub fn send(&self, data: &[u8]) { |
| 65 | let mgr = super::NET_MANAGER.lock().unwrap(); |
| 66 | if let Some(entry) = mgr.websockets.get(&self.id) { |
| 67 | entry.state.send_binary(data); |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | /// Send a text message. |
| 72 | pub fn send_text(&self, text: &str) { |
no test coverage detected