Skip to content

Commit 74b079c

Browse files
authoredAug 3, 2023
feat(transport): Expose TcpConnectInfo fields (#1449)
1 parent 23602b4 commit 74b079c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎tonic/src/transport/server/conn.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ pub trait Connected {
6868
/// [ext]: crate::Request::extensions
6969
#[derive(Debug, Clone)]
7070
pub struct TcpConnectInfo {
71-
local_addr: Option<SocketAddr>,
72-
remote_addr: Option<SocketAddr>,
71+
/// Returns the local address of this connection.
72+
pub local_addr: Option<SocketAddr>,
73+
/// Returns the remote (peer) address of this connection.
74+
pub remote_addr: Option<SocketAddr>,
7375
}
7476

7577
impl TcpConnectInfo {

0 commit comments

Comments
 (0)
Please sign in to comment.