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

View File

@ -21,6 +21,7 @@ type ircConn interface {
SetReadDeadline(time.Time) error SetReadDeadline(time.Time) error
SetWriteDeadline(time.Time) error SetWriteDeadline(time.Time) error
RemoteAddr() net.Addr RemoteAddr() net.Addr
LocalAddr() net.Addr
} }
func newNetIRCConn(c net.Conn) ircConn { func newNetIRCConn(c net.Conn) ircConn {
@ -89,6 +90,12 @@ func (wic websocketIRCConn) RemoteAddr() net.Addr {
return websocketAddr(wic.remoteAddr) 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 type websocketAddr string
func (websocketAddr) Network() string { func (websocketAddr) Network() string {