Skip to content

Commit

Permalink
feat(transport): Expose TcpConnectInfo fields (#1449)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucioFranco authored Aug 3, 2023
1 parent 23602b4 commit 74b079c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tonic/src/transport/server/conn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ pub trait Connected {
/// [ext]: crate::Request::extensions
#[derive(Debug, Clone)]
pub struct TcpConnectInfo {
local_addr: Option<SocketAddr>,
remote_addr: Option<SocketAddr>,
/// Returns the local address of this connection.
pub local_addr: Option<SocketAddr>,
/// Returns the remote (peer) address of this connection.
pub remote_addr: Option<SocketAddr>,
}

impl TcpConnectInfo {
Expand Down

0 comments on commit 74b079c

Please sign in to comment.