Versions in this module Expand all Collapse all v1 v1.1.3 Feb 2, 2021 Changes in this version + var NetConnectError = errcode.NewError(baseCode + 10, "套接字已关闭") + var RecvChannelClosed = errcode.NewError(baseCode + 21, "接收通道已关闭") + var RecvError = errcode.NewError(baseCode + 32, "数据接收过程中出现异常") + var SendChannelClosed = errcode.NewError(baseCode + 20, "发送通道已关闭") + var SendDataLenError = errcode.NewError(baseCode + 30, "发送数据长度异常") + var SendError = errcode.NewError(baseCode + 31, "发送过程中出现异常") + var ServerAddrError = errcode.NewError(baseCode + 2, "IP配置异常") + var ServerBindError = errcode.NewError(baseCode + 1, "端口绑定失败") + type Device struct + func (d *Device) Addr() *net.UDPAddr + func (d *Device) DisConnect() + func (d *Device) IsConnect() bool + func (d *Device) SetAddr(addr *net.UDPAddr) + type UDPData struct + Data []byte + RemoteAddr *net.UDPAddr + type UDPServer struct + func NewUDPServer(s *UDPSettingS) (*UDPServer, error) + func (s *UDPServer) Close() error + func (s *UDPServer) GetSendCh() chan<- *UDPData + func (s UDPServer) GetErrCh() <-chan error + func (s UDPServer) GetRecvCh() <-chan *UDPData + type UDPSettingS struct + ErrorChannelSize int + RecvBufSize int + RecvChannelSize int + SendChannelSize int + ServerHost string + UseErrorChannel bool + func (s *UDPSettingS) String() string