Documentation ¶
Index ¶
- func FrameReader(r io.Reader, server bool) io.Reader
- func FrameWriter(w io.Writer, server bool) io.Writer
- func NewWSDialer(s string, d proxy.Dialer) (proxy.Dialer, error)
- func NewWSSDialer(s string, d proxy.Dialer) (proxy.Dialer, error)
- func NewWSSServer(s string, p proxy.Proxy) (proxy.Server, error)
- func NewWSServer(s string, p proxy.Proxy) (proxy.Server, error)
- type ClientConn
- type ServerConn
- type WS
- func (s *WS) Addr() string
- func (s *WS) Dial(network, addr string) (net.Conn, error)
- func (s *WS) DialUDP(network, addr string) (net.PacketConn, net.Addr, error)
- func (s *WS) ListenAndServe()
- func (s *WS) NewClientConn(rc net.Conn) (*ClientConn, error)
- func (s *WS) NewServerConn(rc net.Conn) (*ServerConn, error)
- func (s *WS) Serve(cc net.Conn)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FrameReader ¶
FrameReader returns a chunked reader.
func FrameWriter ¶
FrameWriter returns a frame writer.
func NewWSDialer ¶
NewWSDialer returns a ws proxy dialer.
func NewWSSDialer ¶ added in v0.15.0
NewWSSDialer returns a wss proxy dialer.
func NewWSSServer ¶ added in v0.15.0
NewWSSServer returns a wss transport server.
Types ¶
type ClientConn ¶ added in v0.12.1
ClientConn is a connection to ws server.
func (*ClientConn) Handshake ¶ added in v0.12.1
func (c *ClientConn) Handshake(host, path, origin string) error
Handshake handshakes with the server using HTTP to request a protocol upgrade.
type ServerConn ¶ added in v0.12.1
ServerConn is a connection to ws client.
func (*ServerConn) Handshake ¶ added in v0.12.1
func (c *ServerConn) Handshake(host, path string) error
Handshake handshakes with the client.
type WS ¶
type WS struct {
// contains filtered or unexported fields
}
WS is the base ws proxy struct.
func (*WS) ListenAndServe ¶ added in v0.12.1
func (s *WS) ListenAndServe()
ListenAndServe listens on server's addr and serves connections.
func (*WS) NewClientConn ¶ added in v0.12.1
func (s *WS) NewClientConn(rc net.Conn) (*ClientConn, error)
NewClientConn creates a new ws client connection.
func (*WS) NewServerConn ¶ added in v0.12.1
func (s *WS) NewServerConn(rc net.Conn) (*ServerConn, error)
NewServerConn creates a new ws server connection.
Click to show internal directories.
Click to hide internal directories.