mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-12 22:10:01 -04:00
add udp sockets
This commit is contained in:
parent
75c48ccded
commit
5a24f53454
9 changed files with 146 additions and 10 deletions
|
@ -108,7 +108,11 @@ async fn handle_mux(
|
|||
.map_err(|x| WispError::Other(Box::new(x)))?;
|
||||
}
|
||||
StreamType::Udp => {
|
||||
let udp_socket = UdpSocket::bind(uri)
|
||||
let udp_socket = UdpSocket::bind("0.0.0.0:0")
|
||||
.await
|
||||
.map_err(|x| WispError::Other(Box::new(x)))?;
|
||||
udp_socket
|
||||
.connect(uri)
|
||||
.await
|
||||
.map_err(|x| WispError::Other(Box::new(x)))?;
|
||||
let mut data = vec![0u8; 65507]; // udp standard max datagram size
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue