qudp

package
v0.0.0-...-35fa672 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandleErrorFunc

type HandleErrorFunc func(*Session, error)

type HandleMessageFunc

type HandleMessageFunc func(*Session, []byte)

type HandleSessionFunc

type HandleSessionFunc func(*Session)

type Listener

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

func (*Listener) Close

func (l *Listener) Close() error

type Server

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

func New

func New(addr *net.UDPAddr) *Server

func (*Server) Close

func (s *Server) Close() error

func (*Server) HandleConnect

func (w *Server) HandleConnect(fn HandleSessionFunc)

func (*Server) HandleError

func (w *Server) HandleError(fn HandleErrorFunc)

func (*Server) HandleMessage

func (w *Server) HandleMessage(fn HandleMessageFunc)

func (*Server) HandleSent

func (w *Server) HandleSent(fn HandleMessageFunc)

func (*Server) Listen

func (s *Server) Listen() error

type Session

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

func (*Session) Close

func (c *Session) Close() error

func (*Session) LocalAddr

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

func (*Session) Read

func (c *Session) Read(b []byte) (int, error)

func (*Session) ReadAll

func (c *Session) ReadAll() (int, []byte, error)

func (*Session) RemoteAddr

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

func (*Session) Write

func (c *Session) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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