add remote_addr test
@@ -29,6 +29,13 @@ async fn pipe() -> Result<(
let (l_conn, raddr) = listener.accept().await?;
assert_eq!(daddr, raddr, "remote address should be match");
+ let raddr = l_conn.remote_addr().await;
+ if let Some(raddr) = raddr {
+ assert_eq!(daddr, raddr, "remote address should be match");
+ } else {
+ assert!(false, "expected Some, but got None, for remote_addr()");
+ }
+
let mut buf = vec![0u8; handshake.len()];
let n = l_conn.recv(&mut buf).await?;
