Documentation ¶
Index ¶
Constants ¶
View Source
const BufferBytes = 8 << 10
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPListener ¶
func NewHTTPListener ¶
func NewHTTPListener() *HTTPListener
func (*HTTPListener) Listen ¶
func (l *HTTPListener) Listen()
func (*HTTPListener) TranslateTCP ¶
func (l *HTTPListener) TranslateTCP(r io.Reader, w io.WriteCloser) error
TranslateTCP makes TCP connection with remote host and call TCPConn.Handle.
type TCPConn ¶
type TCPConn struct {
// contains filtered or unexported fields
}
TCPConn is wrapper of net.Conn.
type TCPListener ¶
func NewTCPListener ¶
func NewTCPListener() *TCPListener
func (*TCPListener) Listen ¶
func (l *TCPListener) Listen()
func (*TCPListener) TranslateWebsocket ¶
func (l *TCPListener) TranslateWebsocket(r io.Reader, w io.WriteCloser) error
TranslateWebsocket makes Websocket connection with remote server and call WebsocketConn.Handle.
type WebsocketConn ¶
WebsocketConn is wrapper of websocket.Conn.
func (*WebsocketConn) Handle ¶
func (ws *WebsocketConn) Handle(r io.Reader, w io.WriteCloser)
Handle reads from Websocket connection and write it to w. Also, reads from r and write it to Websocket connection.
Click to show internal directories.
Click to hide internal directories.