From 20c26d113cbf486336474291ab2b36146d38e2cd Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 11 Aug 2020 10:34:38 +0200 Subject: [PATCH] Add ircConn.LocalAddr --- conn.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/conn.go b/conn.go index af384a7..1e5b1ba 100644 --- a/conn.go +++ b/conn.go @@ -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 {