Changeset 1414 in ntrip
- Timestamp:
- Dec 31, 2008, 1:07:51 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncnetqueryrtp.cpp
r1413 r1414 29 29 _socket = 0; 30 30 _udpSocket = 0; 31 _eventLoop = new QEventLoop(this); 31 32 } 32 33 … … 34 35 //////////////////////////////////////////////////////////////////////////// 35 36 bncNetQueryRtp::~bncNetQueryRtp() { 37 delete _eventLoop; 36 38 delete _socket; 37 39 delete _udpSocket; … … 41 43 //////////////////////////////////////////////////////////////////////////// 42 44 void bncNetQueryRtp::stop() { 43 #ifndef sparc 44 if (_socket) { 45 _socket->abort(); 46 } 47 #endif 45 _eventLoop->quit(); 48 46 _status = finished; 49 47 } … … 57 55 //////////////////////////////////////////////////////////////////////////// 58 56 void bncNetQueryRtp::waitForReadyRead(QByteArray& outData) { 57 58 // Wait Loop 59 // --------- 60 if (!_udpSocket->hasPendingDatagrams()) { 61 _eventLoop->exec(); 62 } 63 64 // Append Data 65 // ----------- 66 QByteArray datagram; 67 datagram.resize(_udpSocket->pendingDatagramSize()); 68 _udpSocket->readDatagram(datagram.data(), datagram.size()); 69 outData.append(datagram); 59 70 } 60 71 … … 104 115 _udpSocket = new QUdpSocket(); 105 116 _udpSocket->bind(clientPort.toInt()); 117 connect(_udpSocket, SIGNAL(readyRead()), _eventLoop, SLOT(quit())); 106 118 107 119 QByteArray reqStr;
Note:
See TracChangeset
for help on using the changeset viewer.