(&mut self, bytes: Vec<u8>)
| 345 | } |
| 346 | |
| 347 | pub fn send_binary(&mut self, bytes: Vec<u8>) -> NetResult<()> { |
| 348 | self.socket |
| 349 | .send(Message::binary(bytes)) |
| 350 | .map_err(|err| NetError::new(NetErrorKind::Send, err.to_string())) |
| 351 | } |
| 352 | |
| 353 | pub fn send_compressed_text(&mut self, text: impl Into<String>) -> NetResult<()> { |
| 354 | let mut bytes = WEBSOCKET_ZLIB_TEXT_PREFIX.to_vec(); |