Skip to content

Commit

Permalink
chore: bump rtp to v0.0.38, udp_listener to v0.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Banyc committed May 4, 2024
1 parent 53de73d commit 37e798a
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 25 deletions.
47 changes: 27 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ once_cell = "1"
pin-project-lite = "0.2"
rand = "0.8"
regex = "1"
rtp = { git = "https://github.com/Banyc/rtp.git", tag = "v0.0.36" }
rtp = { git = "https://github.com/Banyc/rtp.git", tag = "v0.0.38" }
scopeguard = "1"
serde = "1"
serde_json = "1"
Expand All @@ -60,7 +60,7 @@ tokio_throughput = { git = "https://github.com/Banyc/tokio_throughput.git", rev
toml = "0.8"
tracing = "0.1"
tracing-subscriber = "0.3"
udp_listener = { git = "https://github.com/Banyc/udp_listener.git", tag = "v0.0.8" }
udp_listener = { git = "https://github.com/Banyc/udp_listener.git", tag = "v0.0.9" }

[profile.profiling]
inherits = "release"
Expand Down
8 changes: 5 additions & 3 deletions protocol/src/stream/streams/rtp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use tokio::{
use tracing::{error, info, instrument, trace, warn};

use common::{
addr::any_addr,
error::AnyResult,
loading,
stream::{connect::StreamConnect, IoAddr, IoStream, StreamServerHook},
Expand Down Expand Up @@ -84,7 +85,7 @@ where
};
let stream = AddressedRtpStream {
read: accepted.read.into_async_read(),
write: accepted.write.into_async_write(true),
write: accepted.write.into_async_write(),
local_addr: self.listener.local_addr(),
peer_addr: accepted.peer_addr,
};
Expand Down Expand Up @@ -125,10 +126,11 @@ pub struct RtpConnector;
impl StreamConnect for RtpConnector {
type Connection = Connection;
async fn connect(&self, addr: SocketAddr) -> io::Result<Connection> {
let connected = rtp::udp::connect_without_handshake(addr, None).await?;
let connected =
rtp::udp::connect_without_handshake(any_addr(&addr.ip()), addr, None).await?;
let stream = AddressedRtpStream {
read: connected.read.into_async_read(),
write: connected.write.into_async_write(true),
write: connected.write.into_async_write(),
local_addr: connected.local_addr,
peer_addr: connected.peer_addr,
};
Expand Down

0 comments on commit 37e798a

Please sign in to comment.