Documentation ¶
Index ¶
- type Conn
- type FakeUdpConn
- func (c *FakeUdpConn) Close() error
- func (c *FakeUdpConn) IsClosed() bool
- func (c *FakeUdpConn) LocalAddr() net.Addr
- func (c *FakeUdpConn) Read(b []byte) (n int, err error)
- func (c *FakeUdpConn) RemoteAddr() net.Addr
- func (c *FakeUdpConn) SetDeadline(t time.Time) error
- func (c *FakeUdpConn) SetReadDeadline(t time.Time) error
- func (c *FakeUdpConn) SetWriteDeadline(t time.Time) error
- func (c *FakeUdpConn) Write(b []byte) (n int, err error)
- type Listener
- type TcpConn
- type TcpListener
- type UdpListener
- type UdpPacket
- type WrapLogConn
- type WrapReadWriteCloserConn
- func (conn *WrapReadWriteCloserConn) LocalAddr() net.Addr
- func (conn *WrapReadWriteCloserConn) RemoteAddr() net.Addr
- func (conn *WrapReadWriteCloserConn) SetDeadline(t time.Time) error
- func (conn *WrapReadWriteCloserConn) SetReadDeadline(t time.Time) error
- func (conn *WrapReadWriteCloserConn) SetWriteDeadline(t time.Time) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
Conn is the interface of connections used in frp.
func ConnectTcpServer ¶
func ConnectTcpServerByHttpProxy ¶
ConnectTcpServerByHttpProxy try to connect remote server by http proxy. If httpProxy is empty, it will connect server directly.
func WrapReadWriteCloserToConn ¶ added in v0.11.0
func WrapReadWriteCloserToConn(rwc io.ReadWriteCloser) Conn
type FakeUdpConn ¶
func NewFakeUdpConn ¶
func NewFakeUdpConn(l *UdpListener, laddr, raddr net.Addr) *FakeUdpConn
func (*FakeUdpConn) Close ¶
func (c *FakeUdpConn) Close() error
func (*FakeUdpConn) IsClosed ¶
func (c *FakeUdpConn) IsClosed() bool
func (*FakeUdpConn) LocalAddr ¶
func (c *FakeUdpConn) LocalAddr() net.Addr
func (*FakeUdpConn) RemoteAddr ¶
func (c *FakeUdpConn) RemoteAddr() net.Addr
func (*FakeUdpConn) SetDeadline ¶
func (c *FakeUdpConn) SetDeadline(t time.Time) error
func (*FakeUdpConn) SetReadDeadline ¶
func (c *FakeUdpConn) SetReadDeadline(t time.Time) error
func (*FakeUdpConn) SetWriteDeadline ¶
func (c *FakeUdpConn) SetWriteDeadline(t time.Time) error
type TcpListener ¶
func (*TcpListener) Accept ¶
func (l *TcpListener) Accept() (Conn, error)
Wait util get one new connection or listener is closed if listener is closed, err returned.
func (*TcpListener) Close ¶
func (l *TcpListener) Close() error
type UdpListener ¶
func (*UdpListener) Accept ¶
func (l *UdpListener) Accept() (Conn, error)
func (*UdpListener) Close ¶
func (l *UdpListener) Close() error
type WrapReadWriteCloserConn ¶ added in v0.11.0
type WrapReadWriteCloserConn struct { io.ReadWriteCloser log.Logger }
func (*WrapReadWriteCloserConn) LocalAddr ¶ added in v0.11.0
func (conn *WrapReadWriteCloserConn) LocalAddr() net.Addr
func (*WrapReadWriteCloserConn) RemoteAddr ¶ added in v0.11.0
func (conn *WrapReadWriteCloserConn) RemoteAddr() net.Addr
func (*WrapReadWriteCloserConn) SetDeadline ¶ added in v0.11.0
func (conn *WrapReadWriteCloserConn) SetDeadline(t time.Time) error
func (*WrapReadWriteCloserConn) SetReadDeadline ¶ added in v0.11.0
func (conn *WrapReadWriteCloserConn) SetReadDeadline(t time.Time) error
func (*WrapReadWriteCloserConn) SetWriteDeadline ¶ added in v0.11.0
func (conn *WrapReadWriteCloserConn) SetWriteDeadline(t time.Time) error
Click to show internal directories.
Click to hide internal directories.