fix enums, working on channels

This commit is contained in:
mykola2312 2024-12-30 09:23:27 +02:00
parent 25d8e25abd
commit f2b4a45a89
2 changed files with 21 additions and 1 deletions

20
net/lux_channel.go Normal file
View file

@ -0,0 +1,20 @@
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()
}

View file

@ -4,7 +4,7 @@ type LuxType uint
const ( const (
LuxTypeHost = 0 LuxTypeHost = 0
LuxTypeNode LuxTypeNode = 1
) )
const LUX_PROTO_TYPE_SIZE = 2 const LUX_PROTO_TYPE_SIZE = 2