Documentation ¶
Index ¶
- Constants
- Variables
- func IPToBin(ip net.IP) string
- func New(g *config.Group) (d dispatcher.Dispatcher)
- type IPMTUTrie
- type UDP
- func (d *UDP) Auth(buf []byte, data []byte, userContext *config.UserContext) (hit *config.Server, content []byte)
- func (d *UDP) Close() (err error)
- func (d *UDP) GetOrBuildUCPConn(laddr net.Addr, data []byte) (rc *net.UDPConn, err error)
- func (d *UDP) Listen() (err error)
- func (d *UDP) UpdateGroup(group *config.Group)
- type UDPConn
- type UDPConnMapping
Constants ¶
Variables ¶
View Source
var AuthFailedErr = fmt.Errorf("auth failed")
Functions ¶
func New ¶
func New(g *config.Group) (d dispatcher.Dispatcher)
Types ¶
type IPMTUTrie ¶ added in v0.1.2
type IPMTUTrie struct {
// contains filtered or unexported fields
}
var MTUTrie *IPMTUTrie
func NewIPMTUTrieFromInterfaces ¶ added in v0.1.2
type UDP ¶ added in v0.1.3
type UDP struct {
// contains filtered or unexported fields
}
func (*UDP) GetOrBuildUCPConn ¶ added in v0.1.3
connTimeout is the timeout of connection to build if not exists
func (*UDP) UpdateGroup ¶ added in v0.1.3
type UDPConn ¶
type UDPConn struct { Establishing chan struct{} *net.UDPConn // contains filtered or unexported fields }
func NewUDPConn ¶
type UDPConnMapping ¶
func NewUDPConnMapping ¶
func NewUDPConnMapping() *UDPConnMapping
func (*UDPConnMapping) Insert ¶
func (m *UDPConnMapping) Insert(key string, val *net.UDPConn) *UDPConn
pass val=nil for stating it is establishing
func (*UDPConnMapping) Remove ¶
func (m *UDPConnMapping) Remove(key string)
Click to show internal directories.
Click to hide internal directories.