1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-17 18:06:15 -05:00
v2fly/transport/internet/http/connection.go
Darien Raymond d207d953bd
h2 transport
2018-03-01 13:16:52 +01:00

50 lines
785 B
Go

package http
import (
"io"
"time"
"v2ray.com/core/common"
"v2ray.com/core/common/net"
)
type Connection struct {
Reader io.Reader
Writer io.Writer
Closer common.Closable
Local net.Addr
Remote net.Addr
}
func (c *Connection) Read(b []byte) (int, error) {
return c.Reader.Read(b)
}
func (c *Connection) Write(b []byte) (int, error) {
return c.Writer.Write(b)
}
func (c *Connection) Close() error {
return c.Closer.Close()
}
func (c *Connection) LocalAddr() net.Addr {
return c.Local
}
func (c *Connection) RemoteAddr() net.Addr {
return c.Remote
}
func (c *Connection) SetDeadline(t time.Time) error {
return nil
}
func (c *Connection) SetReadDeadline(t time.Time) error {
return nil
}
func (c *Connection) SetWriteDeadline(t time.Time) error {
return nil
}