transport

package
v0.0.0-...-1731d0d Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(remoteAddrs []string, key string, threads int) *Client

func (*Client) ConnectWait

func (c *Client) ConnectWait()

func (*Client) Start

func (c *Client) Start()

func (*Client) Stop

func (c *Client) Stop()

func (*Client) Write

func (c *Client) Write(data []byte)

func (*Client) WriteNow

func (c *Client) WriteNow(data []byte)

type ClientConn

type ClientConn struct {
	// contains filtered or unexported fields
}

func NewClientConn

func NewClientConn(remoteAddr, key string, index int, parentWG *sync.WaitGroup) *ClientConn

func (*ClientConn) Close

func (cc *ClientConn) Close()

func (*ClientConn) IsConnected

func (cc *ClientConn) IsConnected() bool

func (*ClientConn) Write

func (cc *ClientConn) Write(data []byte)

func (*ClientConn) WriteNow

func (cc *ClientConn) WriteNow(data []byte) error

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(addrs []string, handler ServerHandler, key string) *Server

func (*Server) Start

func (s *Server) Start()

type ServerConn

type ServerConn struct {
	// contains filtered or unexported fields
}

func NewServerConn

func NewServerConn(conn *net.TCPConn, key string, handler ServerHandler) *ServerConn

type ServerHandler

type ServerHandler interface {
	OnData([]byte)
}

Jump to

Keyboard shortcuts

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