liangtcp

package module
v0.0.0-...-82480a6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LiangTCP

type LiangTCP interface {
	SendMsg(conn net.Conn, buf []byte) error
}

type LiangTCPClient

type LiangTCPClient struct {
	OnMsg     OnMsgFunc
	OnDisconn OnDisconnFunc
	//port  int
	AESKey []byte
	// contains filtered or unexported fields
}

-------------------------------------------------------------LiangTCPClient

func (*LiangTCPClient) Connect

func (t *LiangTCPClient) Connect(addr string) error

func (*LiangTCPClient) SendMsg

func (t *LiangTCPClient) SendMsg(buf []byte) error

type LiangTCPServer

type LiangTCPServer struct {
	OnMsg     OnMsgFunc
	OnConn    OnConnFunc
	OnDisconn OnDisconnFunc
	//port  int
	AESKey []byte
}

-------------------------------------------------------------LiangTCPServer

func (*LiangTCPServer) Listen

func (t *LiangTCPServer) Listen(addr string) *LiangTCPServer

func (*LiangTCPServer) SendMsg

func (t *LiangTCPServer) SendMsg(conn net.Conn, buf []byte) error

type OnConnFunc

type OnConnFunc func(net.Conn) error

type OnDisconnFunc

type OnDisconnFunc func(net.Conn) error

type OnMsgFunc

type OnMsgFunc func(net.Conn, []byte) error

Jump to

Keyboard shortcuts

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