added default constructor for NetworkPacket

updated param comments in ReceivedPacketProcessor
This commit is contained in:
wangyix 2014-06-10 12:24:47 -07:00
parent d84beee3e4
commit b96b6c9857
3 changed files with 4 additions and 5 deletions

View file

@ -2095,7 +2095,7 @@ void Application::updateMyAvatar(float deltaTime) {
} }
} }
// sent a nack packet containing missing sequence numbers of received packets // sent nack packets containing missing sequence numbers of received packets from nodes
{ {
quint64 now = usecTimestampNow(); quint64 now = usecTimestampNow();
quint64 sinceLastNack = now - _lastNackTime; quint64 sinceLastNack = now - _lastNackTime;

View file

@ -26,6 +26,7 @@
/// Storage of not-yet processed inbound, or not yet sent outbound generic UDP network packet /// Storage of not-yet processed inbound, or not yet sent outbound generic UDP network packet
class NetworkPacket { class NetworkPacket {
public: public:
NetworkPacket() { }
NetworkPacket(const NetworkPacket& packet); // copy constructor NetworkPacket(const NetworkPacket& packet); // copy constructor
NetworkPacket& operator= (const NetworkPacket& other); // copy assignment NetworkPacket& operator= (const NetworkPacket& other); // copy assignment

View file

@ -43,10 +43,8 @@ public:
protected: protected:
/// Callback for processing of recieved packets. Implement this to process the incoming packets. /// Callback for processing of recieved packets. Implement this to process the incoming packets.
/// \param sockaddr& senderAddress the address of the sender /// \param SharedNodePointer& sendingNode the node that sent this packet
/// \param packetData pointer to received data /// \param QByteArray& the packet to be processed
/// \param ssize_t packetLength size of received data
/// \thread "this" individual processing thread
virtual void processPacket(const SharedNodePointer& sendingNode, const QByteArray& packet) = 0; virtual void processPacket(const SharedNodePointer& sendingNode, const QByteArray& packet) = 0;
/// Implements generic processing behavior for this thread. /// Implements generic processing behavior for this thread.