Skip to content

Commit

Permalink
make snapshot: add LocalAddr and RemoteAddr to quic.Conn
Browse files Browse the repository at this point in the history
  • Loading branch information
navigaid committed Dec 10, 2024
1 parent 1642c24 commit de4000a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 44 deletions.
10 changes: 10 additions & 0 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,16 @@ func (c *Conn) String() string {
return fmt.Sprintf("quic.Conn(%v,->%v)", c.side, c.peerAddr)
}

// LocalAddr returns the local network address, if known.
func (c *Conn) LocalAddr() netip.AddrPort {
return c.localAddr
}

// RemoteAddr returns the remote network address, if known.
func (c *Conn) RemoteAddr() netip.AddrPort {
return c.peerAddr
}

// confirmHandshake is called when the handshake is confirmed.
// https://www.rfc-editor.org/rfc/rfc9001#section-4.1.2
func (c *Conn) confirmHandshake(now time.Time) {
Expand Down
43 changes: 0 additions & 43 deletions conn_addr.go

This file was deleted.

0 comments on commit de4000a

Please sign in to comment.