Add ircConn.LocalAddr

git-svn-id: file:///srv/svn/repo/suika/trunk@383 f0ae65fe-ee39-954e-97ec-027ff2717ef4
This commit is contained in:
contact 2020-08-11 08:34:38 +00:00
parent aa04c4bf88
commit 9880c34024

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 {