Changeset 38 in pacpussensors for trunk/PacpusSocket/PacpusSocket.cpp


Ignore:
Timestamp:
Feb 26, 2014, 2:20:53 PM (11 years ago)
Author:
phudelai
Message:

last socket version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PacpusSocket/PacpusSocket.cpp

    r36 r38  
    3131
    3232//////////////////////////////////////////////////////////////////////////
    33 // C
     33// Constructeur
    3434//////////////////////////////////////////////////////////////////////////
    3535PacpusSocket::PacpusSocket(QString name)
     
    9292                        qDebug() << "Socket bound for server on port " << port2bind_;
    9393            else
    94                         qWarning() << "Failed to bind socket on port" << port2bind_;
     94                        qWarning() << "Failed to bind socket for server on port" << port2bind_;
    9595        }
    9696        else if (socketType_ == "client")
    9797        {
    98           if (udpSocket_->bind(QHostAddress::Any, port2send_ + 1, QUdpSocket::DontShareAddress))
    99                         qDebug() << "Socket bound for client on port " << port2send_ + 1;
    100             else
    101                         qWarning() << "Failed to bind socket" << port2send_ + 1;
     98                // Pas utile en tant que client (UDP)
     99          //if (udpSocket_->bind(QHostAddress::Any, port2send_, QUdpSocket::DontShareAddress))
     100                        //qDebug() << "Socket bound for client on port " << port2send_;
     101            //else
     102                        //qWarning() << "Failed to bind socket client on port" << port2send_;
    102103        }
    103104           
     
    165166                if(udpSocket_->readDatagram(datagram.data(), datagram.size(),  &sender, &senderPort) != -1)
    166167                {
    167                     qDebug() << "RCV : " << datagram << " by " << sender << "on port " << senderPort << " size:" << datagram.size();
     168                    //qDebug() << "RCV : " << datagram << " by " << sender << "on port " << senderPort << " size:" << datagram.size();
    168169                   
    169170                    if (socketType_ == "server")
Note: See TracChangeset for help on using the changeset viewer.