gudp

package
v0.0.0-...-c9a36a8 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

UDP服务端

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

tcp server结构体

func GetServer

func GetServer(name ...interface{}) *Server

获取/创建一个空配置的UDP Server 单例模式,请保证name的唯一性

func NewServer

func NewServer(address string, handler func(*net.UDPConn), names ...string) *Server

创建一个tcp server对象,并且可以选择指定一个单例名字

func (*Server) Run

func (s *Server) Run() error

执行监听

func (*Server) SetAddress

func (s *Server) SetAddress(address string)

设置参数 - address

func (*Server) SetHandler

func (s *Server) SetHandler(handler func(*net.UDPConn))

设置参数 - handler

Jump to

Keyboard shortcuts

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