20 lines
259 B
Go
20 lines
259 B
Go
package net
|
|
|
|
import "net"
|
|
|
|
type LuxChannelType uint
|
|
|
|
const (
|
|
LuxChannelInterior = 0
|
|
LuxChannelExterior = 1
|
|
)
|
|
|
|
type LuxChannel struct {
|
|
Type LuxChannelType
|
|
Address *net.UDPAddr
|
|
conn *net.UDPConn
|
|
}
|
|
|
|
func (ch *LuxChannel) Close() {
|
|
ch.conn.Close()
|
|
}
|