- Timestamp:
- Jan 4, 2010, 3:46:58 PM (15 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bnccaster.cpp
r2183 r2184 38 38 * 39 39 * -----------------------------------------------------------------------*/ 40 41 #include <iostream>42 40 43 41 #include <math.h> … … 539 537 //////////////////////////////////////////////////////////////////////////// 540 538 void bncCaster::slotNewNMEAstr(QByteArray str) { 541 542 std::cout << str.data(); 543 544 } 539 if (_nmeaSockets) { 540 QMutableListIterator<QTcpSocket*> is(*_nmeaSockets); 541 while (is.hasNext()) { 542 QTcpSocket* sock = is.next(); 543 if (sock->state() == QAbstractSocket::ConnectedState) { 544 sock->write(str); 545 } 546 else if (sock->state() != QAbstractSocket::ConnectingState) { 547 delete sock; 548 is.remove(); 549 } 550 } 551 } 552 } -
trunk/BNC/bnccaster.h
r2182 r2184 56 56 void slotNewConnection(); 57 57 void slotNewUConnection(); 58 void slotNewNMEAConnection(); 58 59 void slotGetThreadFinished(QByteArray staID); 59 60 … … 69 70 QTcpServer* _server; 70 71 QTcpServer* _uServer; 72 QTcpServer* _nmeaServer; 71 73 QList<QTcpSocket*>* _sockets; 72 74 QList<QTcpSocket*>* _uSockets; 75 QList<QTcpSocket*>* _nmeaSockets; 73 76 QList<QByteArray> _staIDs; 74 77 QList<bncGetThread*> _threads;
Note:
See TracChangeset
for help on using the changeset viewer.