Qt 4.8
Classes | Macros | Functions
qpacketprotocol.cpp File Reference
#include "private/qpacketprotocol_p.h"
#include <QBuffer>
#include <QElapsedTimer>
#include <qpacketprotocol.moc>

Go to the source code of this file.

Classes

class  QPacketProtocolPrivate
 

Macros

#define MAX_PACKET_SIZE   0x7FFFFFFF
 

Functions

static int qt_timeout_value (int msecs, int elapsed)
 

Macro Definition Documentation

◆ MAX_PACKET_SIZE

#define MAX_PACKET_SIZE   0x7FFFFFFF

Definition at line 49 of file qpacketprotocol.cpp.

Function Documentation

◆ qt_timeout_value()

static int qt_timeout_value ( int  msecs,
int  elapsed 
)
static

Definition at line 345 of file qpacketprotocol.cpp.

Referenced by QPacketProtocol::waitForReadyRead().

346 {
347  if (msecs == -1)
348  return -1;
349 
350  int timeout = msecs - elapsed;
351  return timeout < 0 ? 0 : timeout;
352 }
static double elapsed(qint64 after, qint64 before)