2024-03-23 17:34:51 +00:00
|
|
|
package httpupgrade
|
|
|
|
|
|
|
|
import "net"
|
|
|
|
|
2024-07-11 22:20:06 +00:00
|
|
|
type connection struct {
|
2024-03-23 17:34:51 +00:00
|
|
|
net.Conn
|
|
|
|
remoteAddr net.Addr
|
|
|
|
}
|
|
|
|
|
2024-07-11 22:20:06 +00:00
|
|
|
func newConnection(conn net.Conn, remoteAddr net.Addr) *connection {
|
|
|
|
return &connection{
|
2024-03-23 17:34:51 +00:00
|
|
|
Conn: conn,
|
|
|
|
remoteAddr: remoteAddr,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-07-11 22:20:06 +00:00
|
|
|
func (c *connection) RemoteAddr() net.Addr {
|
2024-03-23 17:34:51 +00:00
|
|
|
return c.remoteAddr
|
|
|
|
}
|