common

package
v0.0.0-...-f2a809f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//BufferSize is size of read and write buffer
	BufferSize = 4 * 1048576 // 4M
)

Variables

This section is empty.

Functions

func TCP2Ws

func TCP2Ws(ctx context.Context, cancel context.CancelFunc, wsConn *websocket.Conn, tcpConn net.Conn)

TCP2Ws read data from tcp and write it to websocket

func Ws2Tcp

func Ws2Tcp(ctx context.Context, cancel context.CancelFunc, wsConn *websocket.Conn, tcpConn net.Conn)

Ws2Tcp read data from websocket and write it to tcp

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL