(&mut self, text: impl Into<String>)
| 339 | } |
| 340 | |
| 341 | pub fn send_text(&mut self, text: impl Into<String>) -> NetResult<()> { |
| 342 | self.socket |
| 343 | .send(Message::text(text.into())) |
| 344 | .map_err(|err| NetError::new(NetErrorKind::Send, err.to_string())) |
| 345 | } |
| 346 | |
| 347 | pub fn send_binary(&mut self, bytes: Vec<u8>) -> NetResult<()> { |
| 348 | self.socket |