request: Add RemoteAddr helper function
This commit is contained in:
parent
82bdffc1eb
commit
f156be19b4
@ -119,3 +119,11 @@ func (r *Request) ServerName() string {
|
|||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RemoteAddr returns the remote network address of the client.
|
||||||
|
func (r *Request) RemoteAddr() net.Addr {
|
||||||
|
if r.conn != nil {
|
||||||
|
return r.conn.RemoteAddr()
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user