Adjust message type names
parent
240de8bfb5
commit
7fa4ff7802
|
|
@ -9,7 +9,10 @@ type ID = uint16
|
||||||
type ReliableConn struct {
|
type ReliableConn struct {
|
||||||
addr *net.UDPAddr // Associated UDP addr
|
addr *net.UDPAddr // Associated UDP addr
|
||||||
lastID ID // Last ID sent
|
lastID ID // Last ID sent
|
||||||
awaitingQueue []ReliablePacket
|
awaitingQueue []ReliablePacket // Queue of sent packets awaiting a response.
|
||||||
|
outboundQueue []ReliablePacket // Queue of packets awaiting to be sent.
|
||||||
|
inboundQueue []ReliablePacket // Queue of packets received.
|
||||||
|
inbound []byte // Inbound byte buffer.
|
||||||
}
|
}
|
||||||
|
|
||||||
// ReliablePacketType is the 8-bit value representing the packet's type.
|
// ReliablePacketType is the 8-bit value representing the packet's type.
|
||||||
|
|
@ -18,14 +21,14 @@ type ReliablePacketType uint8
|
||||||
const (
|
const (
|
||||||
// TypeEmpty represents a packet with no payload data. Generally useful for keepalives and NAT bypass.
|
// TypeEmpty represents a packet with no payload data. Generally useful for keepalives and NAT bypass.
|
||||||
TypeEmpty ReliablePacketType = iota
|
TypeEmpty ReliablePacketType = iota
|
||||||
// TypeSingle represents a packet that contains an entire message.
|
// TypeMessage represents a packet that contains an entire message.
|
||||||
TypeSingle
|
TypeMessage
|
||||||
// TypeMultiBegin represents a packet that contains the beginning of a message.
|
// TypeMessageBegin represents a packet that contains the beginning of a message.
|
||||||
TypeMultiBegin
|
TypeMessageBegin
|
||||||
// TypeMultiPart represents a packet that contains the part of a message.
|
// TypeMessagePart represents a packet that contains the part of a message.
|
||||||
TypeMultiPart
|
TypeMessagePart
|
||||||
// TypeMultiEnd represents a packet that contains the end of a message.
|
// TypeMessageEnd represents a packet that contains the end of a message.
|
||||||
TypeMultiEnd
|
TypeMessageEnd
|
||||||
)
|
)
|
||||||
|
|
||||||
// ReliablePacket represents our multiple ReliablePacket types.
|
// ReliablePacket represents our multiple ReliablePacket types.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue