Subversion Repositories tpanel

Rev

Rev 477 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 477 Rev 482
Line 334... Line 334...
334
            connect(mPushTimer, &QTimer::timeout, [this, io]()
334
            connect(mPushTimer, &QTimer::timeout, [this, io]()
335
            {
335
            {
336
                if (mUdpTalker->state() != QUdpSocket::ConnectedState || io == nullptr)
336
                if (mUdpTalker->state() != QUdpSocket::ConnectedState || io == nullptr)
337
                    return;
337
                    return;
338
 
338
 
339
                int len = io->bytesAvailable();
339
                qint64 len = io->bytesAvailable();
340
                MSG_DEBUG(len << " bytes available");
340
                MSG_DEBUG(len << " bytes available");
341
                int chunks = len / DATA_SIZE;
341
                qint64 chunks = len / DATA_SIZE;
342
 
342
 
343
                if (chunks > 0)
343
                if (chunks > 0)
344
                {
344
                {
345
                    mMicOpen = true;
345
                    mMicOpen = true;
346
 
346
 
Line 462... Line 462...
462
bool TQIntercom::connectTalker()
462
bool TQIntercom::connectTalker()
463
{
463
{
464
    DECL_TRACER("TQIntercom::connectTalker()");
464
    DECL_TRACER("TQIntercom::connectTalker()");
465
 
465
 
466
    // First we initialize the socket
466
    // First we initialize the socket
467
    QHostAddress hostAddress(QString(mIntercom.ip.c_str()));
467
//    QHostAddress hostAddress(QString(mIntercom.ip.c_str()));
468
 
468
 
469
    if (mUdpTalker)
469
    if (mUdpTalker)
470
    {
470
    {
471
        if (mUdpTalker->isOpen())
471
        if (mUdpTalker->isOpen())
472
            mUdpTalker->close();
472
            mUdpTalker->close();