udp

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

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

func NewConn

func NewConn(conn net.Conn, srv *Server) *Conn

func (*Conn) Close

func (c *Conn) Close()

func (*Conn) IsClosed

func (c *Conn) IsClosed() bool

func (*Conn) LocalAddr

func (c *Conn) LocalAddr() net.Addr

func (*Conn) RemoteAddr

func (c *Conn) RemoteAddr() net.Addr

func (*Conn) SetUserData

func (c *Conn) SetUserData(data interface{})

func (*Conn) UserData

func (c *Conn) UserData() interface{}

func (*Conn) WriteMsg

func (c *Conn) WriteMsg(msg interface{})

type Server

type Server struct {
	Addr             string
	MaxConnNum       int32
	SendChanLimit    int32         // the limit of packet send channel
	RecChanLimit     int32         // the limit of packet receive channel
	ConnReadTimeout  time.Duration // read timeout
	ConnWriteTimeout time.Duration // write timeout

	// msg parser
	AgentChanRPC *chanrpc.Server    //handle rpc msg
	Processor    network.Processor  //handle json or pb
	MsgParser    *network.MsgParser //handle read and write
	// contains filtered or unexported fields
}

func (*Server) Close

func (s *Server) Close()

func (*Server) Start

func (s *Server) Start()

Jump to

Keyboard shortcuts

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