add local addr and remote addr for session

This commit is contained in:
parkerzhu
2019-07-16 01:44:17 +08:00
committed by Ola
parent b10d057bd5
commit fd663c8c45
+10
View File
@@ -218,3 +218,13 @@ func (s *Session) MustGet(key string) interface{} {
func (s *Session) IsClosed() bool {
return s.closed()
}
// LocalAddr returns the local addr of the connection.
func (s *session) LocalAddr() net.Addr {
return conn.LocalAddr()
}
// RemoteAddr returns the remote addr of the connection.
func (s *session) RemoteAddr() net.Addr {
return conn.RemoteAddr()
}