add interface xnet.SrcAddr/DstAddr
This commit is contained in:
@@ -107,9 +107,16 @@ func (c *limitConn) Metadata() metadata.Metadata {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *limitConn) ClientAddr() net.Addr {
|
||||
if sc, ok := c.Conn.(xnet.ClientAddr); ok {
|
||||
return sc.ClientAddr()
|
||||
func (c *limitConn) SrcAddr() net.Addr {
|
||||
if sc, ok := c.Conn.(xnet.SrcAddr); ok {
|
||||
return sc.SrcAddr()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *limitConn) DstAddr() net.Addr {
|
||||
if sc, ok := c.Conn.(xnet.DstAddr); ok {
|
||||
return sc.DstAddr()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user