fix enums, working on channels
This commit is contained in:
parent
25d8e25abd
commit
f2b4a45a89
2 changed files with 21 additions and 1 deletions
20
net/lux_channel.go
Normal file
20
net/lux_channel.go
Normal 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()
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@ type LuxType uint
|
|||
|
||||
const (
|
||||
LuxTypeHost = 0
|
||||
LuxTypeNode
|
||||
LuxTypeNode = 1
|
||||
)
|
||||
|
||||
const LUX_PROTO_TYPE_SIZE = 2
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue