Changeset 2184 in ntrip for trunk/BNC/bnccaster.cpp


Ignore:
Timestamp:
Jan 4, 2010, 3:46:58 PM (14 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bnccaster.cpp

    r2183 r2184  
    3838 *
    3939 * -----------------------------------------------------------------------*/
    40 
    41 #include <iostream>
    4240
    4341#include <math.h>
     
    539537////////////////////////////////////////////////////////////////////////////
    540538void 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}
Note: See TracChangeset for help on using the changeset viewer.