Implement event-based UDP interface

This commit is contained in:
Aram 🍐 2022-01-08 02:25:56 -05:00
parent 51788c9557
commit abd9df6be4
7 changed files with 218 additions and 50 deletions

View file

@ -90,7 +90,7 @@ async fn handle_tcp_proxy_connection(
match socket.try_read_buf(&mut buffer) {
Ok(size) if size > 0 => {
let data = Vec::from(&buffer[..size]);
endpoint.send(Event::LocalData(virtual_port, data));
endpoint.send(Event::LocalData(port_forward, virtual_port, data));
// Reset buffer
buffer.clear();
}