diff --git a/net/lux_channel.go b/net/lux_channel.go new file mode 100644 index 0000000..f9efc55 --- /dev/null +++ b/net/lux_channel.go @@ -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() +} diff --git a/proto/lux_type.go b/proto/lux_type.go index 9707544..b5a72a7 100644 --- a/proto/lux_type.go +++ b/proto/lux_type.go @@ -4,7 +4,7 @@ type LuxType uint const ( LuxTypeHost = 0 - LuxTypeNode + LuxTypeNode = 1 ) const LUX_PROTO_TYPE_SIZE = 2