Documentation
¶
Index ¶
- func DeleteChat(conn *gtcp.Conn, chatID string)
- func DeleteConn(conn *gtcp.Conn)
- func GetChat(conn *gtcp.Conn, chatID string) options.BuffIterator
- func NewBuffWithPrefix(p options.NetType, length int) (buff []byte, uuid string)
- func NewUID() []byte
- func PackBuff(chatID string, buf []byte) (buff []byte)
- func ProxyHTTP(ctx context.Context, proxy *gtcp.Conn, bridge *gtcp.Conn) (recvByte, sendByte int, err error)
- func ReadConn(ctx context.Context, src *gtcp.Conn, buf []byte, ticker *time.Ticker) options.BuffIterator
- func SetChat(conn *gtcp.Conn, chatID string, ch options.BuffIterator)
- func SetDeadLine(conn *gtcp.Conn) error
- func UnpackBuff(buf []byte) (chatID string, data []byte, ok bool)
- func WriteConn(conn *gtcp.Conn, ch options.BuffIterator, sendB int) (err error)
- type BalanceHTTP
- type BalanceTCP
- type BalanceUDP
- type HTTPChannel
- type HTTPConn
- type TCPChannel
- type TCPConn
- type UDPConn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetChat ¶
func GetChat(conn *gtcp.Conn, chatID string) options.BuffIterator
GetChat 获取通信channel
func NewBuffWithPrefix ¶
NewBuffWithPrefix NewBuffWithPrefix p 前缀 length 预分配buff内存
func ProxyHTTP ¶
func ProxyHTTP(ctx context.Context, proxy *gtcp.Conn, bridge *gtcp.Conn) (recvByte, sendByte int, err error)
ProxyHTTP 读取http
func ReadConn ¶
func ReadConn(ctx context.Context, src *gtcp.Conn, buf []byte, ticker *time.Ticker) options.BuffIterator
ReadConn 读取
Types ¶
type BalanceHTTP ¶
BalanceHTTP 负载均衡
type BalanceTCP ¶
BalanceTCP 负载均衡
type BalanceUDP ¶
BalanceUDP 负载均衡
type HTTPChannel ¶
type HTTPChannel struct {
// contains filtered or unexported fields
}
HTTPChannel Http 连接
func NewHTTPChanel ¶
func NewHTTPChanel(unionID string, proxy net.TCPListener, bridge net.Conn) *HTTPChannel
NewHTTPChanel 新建HTTP代理服务
type TCPChannel ¶
type TCPChannel struct {
// contains filtered or unexported fields
}
TCPChannel TCP 连接
Source Files
¶
Click to show internal directories.
Click to hide internal directories.