Adjust message type names
parent
240de8bfb5
commit
7fa4ff7802
|
@ -7,9 +7,12 @@ type ID = uint16
|
|||
|
||||
// ReliableConn represents a UDP connection to an associated UDPAddr.
|
||||
type ReliableConn struct {
|
||||
addr *net.UDPAddr // Associated UDP addr
|
||||
lastID ID // Last ID sent
|
||||
awaitingQueue []ReliablePacket
|
||||
addr *net.UDPAddr // Associated UDP addr
|
||||
lastID ID // Last ID sent
|
||||
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.
|
||||
|
@ -18,14 +21,14 @@ type ReliablePacketType uint8
|
|||
const (
|
||||
// TypeEmpty represents a packet with no payload data. Generally useful for keepalives and NAT bypass.
|
||||
TypeEmpty ReliablePacketType = iota
|
||||
// TypeSingle represents a packet that contains an entire message.
|
||||
TypeSingle
|
||||
// TypeMultiBegin represents a packet that contains the beginning of a message.
|
||||
TypeMultiBegin
|
||||
// TypeMultiPart represents a packet that contains the part of a message.
|
||||
TypeMultiPart
|
||||
// TypeMultiEnd represents a packet that contains the end of a message.
|
||||
TypeMultiEnd
|
||||
// TypeMessage represents a packet that contains an entire message.
|
||||
TypeMessage
|
||||
// TypeMessageBegin represents a packet that contains the beginning of a message.
|
||||
TypeMessageBegin
|
||||
// TypeMessagePart represents a packet that contains the part of a message.
|
||||
TypeMessagePart
|
||||
// TypeMessageEnd represents a packet that contains the end of a message.
|
||||
TypeMessageEnd
|
||||
)
|
||||
|
||||
// ReliablePacket represents our multiple ReliablePacket types.
|
||||
|
|
Loading…
Reference in New Issue