mirror of
https://github.com/arampoire/onetun.git
synced 2025-12-01 06:40:24 -05:00
Implement event-based UDP interface
This commit is contained in:
parent
51788c9557
commit
abd9df6be4
7 changed files with 218 additions and 50 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue