Skip to content

Commit

Permalink
Fixing build issues with signature of .accept() function.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredwolff committed Jun 30, 2023
1 parent dd182ac commit 8e95ad0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dtls/examples/listen/psk/listen_psk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ async fn main() -> Result<(), Error> {
let listener2 = Arc::clone(&listener);
let h2 = Arc::clone(&h);
tokio::spawn(async move {
while let Ok((dtls_conn, _remote_addr)) = listener2.accept().await {
while let Ok((dtls_conn, _ctx, _remote_addr)) = listener2.accept().await {
// Register the connection with the chat hub
h2.register(dtls_conn).await;
}
Expand Down
2 changes: 1 addition & 1 deletion dtls/examples/listen/selfsign/listen_selfsign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async fn main() -> Result<(), Error> {
let listener2 = Arc::clone(&listener);
let h2 = Arc::clone(&h);
tokio::spawn(async move {
while let Ok((dtls_conn, _remote_addr)) = listener2.accept().await {
while let Ok((dtls_conn, _ctx, _remote_addr)) = listener2.accept().await {
// Register the connection with the chat hub
h2.register(dtls_conn).await;
}
Expand Down
2 changes: 1 addition & 1 deletion dtls/examples/listen/verify/listen_verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ async fn main() -> Result<(), Error> {
}
result = listener2.accept() => {
match result{
Ok((dtls_conn, _)) => {
Ok((dtls_conn, _ctx, _)) => {
// Register the connection with the chat hub
h2.register(dtls_conn).await;
}
Expand Down
8 changes: 4 additions & 4 deletions util/src/conn/conn_udp_listener_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async fn pipe() -> Result<(
let daddr = d_conn.local_addr()?;

// Accept the connection
let (l_conn, raddr) = listener.accept().await?;
let (l_conn, _ctx, raddr) = listener.accept().await?;
assert_eq!(daddr, raddr, "remote address should be match");

let raddr = l_conn.remote_addr();
Expand Down Expand Up @@ -119,7 +119,7 @@ async fn test_listener_accept_filter() -> Result<()> {
let listener2 = Arc::clone(&listener);
tokio::spawn(async move {
let (c, _raddr) = match listener2.accept().await {
Ok((c, raddr)) => (c, raddr),
Ok((c, _ctx, raddr)) => (c, raddr),
Err(err) => {
assert_eq!(Error::ErrClosedListener, err);
return Result::<()>::Ok(());
Expand Down Expand Up @@ -179,7 +179,7 @@ async fn test_listener_concurrent() -> Result<()> {

let mut b = vec![0u8; 1];
for i in 0..BACKLOG as u8 {
let (conn, _raddr) = listener.accept().await?;
let (conn, _ctx, _raddr) = listener.accept().await?;
let n = conn.recv(&mut b).await?;
assert_eq!(
&b[..n],
Expand All @@ -197,7 +197,7 @@ async fn test_listener_concurrent() -> Result<()> {
let listener2 = Arc::clone(&listener);
tokio::spawn(async move {
match listener2.accept().await {
Ok((conn, _raddr)) => {
Ok((conn, _ctx, _raddr)) => {
conn.close().await?;
}
Err(err) => {
Expand Down

0 comments on commit 8e95ad0

Please sign in to comment.