mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-29 21:29:56 +02:00
DS assigns 16-bit IDs as well as UUIDs; ACs track mappings; nodes use short IDs in packets. Initial setup works; then fails prob. due to DS UUID.
45 lines
1.4 KiB
C++
45 lines
1.4 KiB
C++
//
|
|
// NLPacketList.h
|
|
// libraries/networking/src
|
|
//
|
|
// Created by Stephen Birarda on 07/06/15.
|
|
// Copyright 2015 High Fidelity, Inc.
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
//
|
|
|
|
#ifndef hifi_NLPacketList_h
|
|
#define hifi_NLPacketList_h
|
|
|
|
#include "udt/PacketList.h"
|
|
|
|
#include "NLPacket.h"
|
|
|
|
class NLPacketList : public udt::PacketList {
|
|
public:
|
|
static std::unique_ptr<NLPacketList> create(PacketType packetType, QByteArray extendedHeader = QByteArray(),
|
|
bool isReliable = false, bool isOrdered = false);
|
|
|
|
PacketVersion getVersion() const { return _packetVersion; }
|
|
NLPacket::LocalID getSourceID() const { return _sourceID; }
|
|
|
|
qint64 getMaxSegmentSize() const override { return NLPacket::maxPayloadSize(_packetType, _isOrdered); }
|
|
|
|
private:
|
|
NLPacketList(PacketType packetType, QByteArray extendedHeader = QByteArray(), bool isReliable = false,
|
|
bool isOrdered = false);
|
|
NLPacketList(udt::PacketList&& packetList);
|
|
NLPacketList(const NLPacketList& other) = delete;
|
|
NLPacketList& operator=(const NLPacketList& other) = delete;
|
|
|
|
virtual std::unique_ptr<udt::Packet> createPacket() override;
|
|
|
|
|
|
PacketVersion _packetVersion;
|
|
NLPacket::LocalID _sourceID;
|
|
};
|
|
|
|
Q_DECLARE_METATYPE(QSharedPointer<NLPacketList>)
|
|
|
|
#endif // hifi_PacketList_h
|