Call the read callback function, forward the callback returned value
(&self, data: &[u8])
| 137 | |
| 138 | /// Call the read callback function, forward the callback returned value |
| 139 | pub fn notify_read(&self, data: &[u8]) -> bool { |
| 140 | unsafe { |
| 141 | BNNotifyWebsocketClientReadData( |
| 142 | self.handle.as_ptr(), |
| 143 | data.as_ptr() as *mut _, |
| 144 | data.len().try_into().unwrap(), |
| 145 | ) |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | pub fn write(&self, data: &[u8]) -> bool { |
| 150 | let len = u64::try_from(data.len()).unwrap(); |