func (c *Client) NextPacketID() uint32 {
	i := atomic.LoadUint32(&c.packetID)
	if i == uint32(65535) || i == uint32(0) {
		atomic.StoreUint32(&c.packetID, 1)
		return 1
	}

	return atomic.AddUint32(&c.packetID, 1)
}
// NextPacketID returns the next packet id for a client, looping back to 0
// if the maximum ID has been reached.
NextPacketID returns the next packet id for a client, looping back to 0
if the maximum ID has been reached.
// NextPacketID returns the next packet id for a client looping back to 0 // if the maximum ID has been reached .
func (c *Client) NextPacketID() uint32 {
	i := atomic.LoadUint32(&c.packetID)
	if i == uint32(65535) || i == uint32(0) {
		atomic.StoreUint32(&c.packetID, 1)
		return 1
	}
	return atomic.AddUint32(&c.packetID, 1)
}
func ( c * Client ) NextPacketID ( ) uint32 { i := atomic . LoadUint32 ( & c . packetID ) if i == uint32 ( 65535 ) || i == uint32 ( 0 ) { atomic . StoreUint32 ( & c . packetID , 1 ) return 1 } return atomic . AddUint32 ( & c . packetID , 1 ) }
NextPacketID returns the next packet id for a client, looping back to 0
if the maximum ID has been reached.
NextPacketID returns the next packet id for a client looping back to 0 if the maximum ID has been reached .