tcp

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: Unlicense Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TcpClinetAcceptCallBindingMethod string

Clinet tcp接受回调方法

View Source
var TcpClinetAcceptCallBindingStruct string

Clinet tcp接受回调注入体

View Source
var TcpClinetMsgNum int

Clinet 发送消息队列

View Source
var TcpClinetPort int

Clinet 端口

View Source
var TcpServerAcceptCallBindingMethod string

Server tcp接受回调方法

View Source
var TcpServerAcceptCallBindingPoolNum int

Server 回调线程数量

View Source
var TcpServerAcceptCallBindingStruct string

Server tcp接受回调注入体

View Source
var TcpServerPort int

Server 端口

Functions

func SendMsg

func SendMsg(tcpMsg *TcpMsg)

func SendMsgByConn

func SendMsgByConn(msg string, conn net.Conn)

func Start

func Start()

func Stop

func Stop()

Types

type ClinetTcpCallJob

type ClinetTcpCallJob struct {
	Time   time.Time
	TcpMsg *TcpMsg
}

Tcp接受消息回调方法

type OctopusClinetTcp

type OctopusClinetTcp struct {
	TcpClinetPort int
	TcpMsgChan    chan *TcpMsg
}

type OctopusServerTcp

type OctopusServerTcp struct {
	TcpServerPort int
	// contains filtered or unexported fields
}

type OctopusTcp

type OctopusTcp struct {
	OctopusClinetTcp *OctopusClinetTcp
	OctopusServerTcp *OctopusServerTcp
}

type ServerTcpCallJob

type ServerTcpCallJob struct {
	Ip   string
	Port int
	Msg  string
	Time time.Time
	Conn *net.Conn
}

Tcp接受消息回调方法

func (*ServerTcpCallJob) Close

func (c *ServerTcpCallJob) Close()

关闭

func (*ServerTcpCallJob) Execute

func (c *ServerTcpCallJob) Execute()

执行方法

type TcpMsg

type TcpMsg struct {
	Ip   string
	Port int
	Msg  string
}

type TcpStart

type TcpStart struct {
	ServerPort           int    `autoInjectCfg:"octopus.tcp.server.port"`
	ServerBindingPoolNum int    `autoInjectCfg:"octopus.tcp.server.binding.pool.num"`
	ServerBindingMethod  string `autoInjectCfg:"octopus.tcp.server.binding.method"`
	ServerBindingStruct  string `autoInjectCfg:"octopus.tcp.server.binding.struct"`
	ClinetPort           int    `autoInjectCfg:"octopus.tcp.clinet.port"`
	ClinetMsgNum         int    `autoInjectCfg:"octopus.tcp.clinet.msg.num"`
	ClinetBindingMethod  string `autoInjectCfg:"octopus.tcp.clinet.binding.method"`
	ClinetBindingStruct  string `autoInjectCfg:"octopus.tcp.clinet.binding.struct"`
}

Tcp启动方法

func (*TcpStart) Start

func (t *TcpStart) Start()

func (*TcpStart) Stop

func (t *TcpStart) Stop()

type TcpStop

type TcpStop struct {
}

Tcp停止方法

Jump to

Keyboard shortcuts

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