Add ircConn.LocalAddr
This commit is contained in:
parent
0812c795f4
commit
20c26d113c
7
conn.go
7
conn.go
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user