add New function

master
dingjun 6 years ago
parent f692dc7ce3
commit 91a19aa881

@ -18,6 +18,11 @@ type protoConn struct {
proxy *proxyproto.Header
}
// New create a wrapped listener
func New(l net.Listener) net.Listener {
return &protoListener{l}
}
func (l *protoListener) Accept() (net.Conn, error) {
c, err := l.Listener.Accept()
if err != nil {

Loading…
Cancel
Save