udp

package
v0.0.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UdpAcceptCallBindingMethod string

udp 接受回调方法

View Source
var UdpAcceptCallBindingPoolNum = 2

udp 接受回调线程池数量

View Source
var UdpAcceptCallBindingStruct string

udp 接受回调注入体

View Source
var UdpMsgNum = 512

udp 信息数量

View Source
var UdpPort int

存放默认常量 udp 端口

Functions

func SendMsg

func SendMsg(udpMsg *UdpMsg)

func Start

func Start()

func Stop

func Stop()

Types

type OctopusUdp

type OctopusUdp struct {
	Port int

	UdpMsgChan chan *UdpMsg
	// contains filtered or unexported fields
}

type UdpCallJob

type UdpCallJob struct {
	Ip   string
	Port int
	Msg  string
	Time time.Time
}

Udp接受消息回调方法

func (*UdpCallJob) Close

func (c *UdpCallJob) Close()

关闭

func (*UdpCallJob) Execute

func (c *UdpCallJob) Execute()

执行方法

type UdpMsg

type UdpMsg struct {
	Ip   string
	Port int
	Msg  string
}

type UdpStart

type UdpStart struct {
	Port           int    `autoInjectCfg:"octopus.udp.port"`
	MsgNum         int    `autoInjectCfg:"octopus.udp.msg.num"`
	BindingPoolNum int    `autoInjectCfg:"octopus.udp.binding.pool.num"`
	BindingMethod  string `autoInjectCfg:"octopus.udp.binding.method"`
	BindingStruct  string `autoInjectCfg:"octopus.udp.binding.struct"`
}

Udp启动方法

func (*UdpStart) Start

func (u *UdpStart) Start()

func (*UdpStart) Stop

func (d *UdpStart) Stop()

type UdpStop

type UdpStop struct {
}

Udp停止方法

Jump to

Keyboard shortcuts

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