Test and fix notify

More tests and add RemoteAddr to State, prolly LocalAddr will be

useful as well.

Fixed and tested IsNotify method.
This commit is contained in:
Miek Gieben
2016-04-07 07:42:58 +01:00
parent 225cdd1ca3
commit e4c72719bf
5 changed files with 104 additions and 56 deletions

View File

@@ -50,6 +50,11 @@ func (s *State) Port() (string, error) {
return port, nil
}
// RemoteAddr returns the net.Addr of the client that sent the current request.
func (s *State) RemoteAddr() string {
return s.W.RemoteAddr().String()
}
// Proto gets the protocol used as the transport. This
// will be udp or tcp.
func (s *State) Proto() string {