Add ircConn.LocalAddr

This commit is contained in:
Simon Ser 2020-08-11 10:34:38 +02:00
parent 0812c795f4
commit 20c26d113c
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
1 changed files with 7 additions and 0 deletions

View File

@ -21,6 +21,7 @@ type ircConn interface {
SetReadDeadline(time.Time) error
SetWriteDeadline(time.Time) error
RemoteAddr() net.Addr
LocalAddr() net.Addr
}
func newNetIRCConn(c net.Conn) ircConn {
@ -89,6 +90,12 @@ func (wic websocketIRCConn) RemoteAddr() net.Addr {
return websocketAddr(wic.remoteAddr)
}
func (wic websocketIRCConn) LocalAddr() net.Addr {
// Behind a reverse HTTP proxy, we don't have access to the real listening
// address
return websocketAddr("")
}
type websocketAddr string
func (websocketAddr) Network() string {