Changeset 2184 in ntrip


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

* empty log message *

Location:
trunk/BNC
Files:
2 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}
  • trunk/BNC/bnccaster.h

    r2182 r2184  
    5656   void slotNewConnection();
    5757   void slotNewUConnection();
     58   void slotNewNMEAConnection();
    5859   void slotGetThreadFinished(QByteArray staID);
    5960
     
    6970   QTcpServer*             _server;
    7071   QTcpServer*             _uServer;
     72   QTcpServer*             _nmeaServer;
    7173   QList<QTcpSocket*>*     _sockets;
    7274   QList<QTcpSocket*>*     _uSockets;
     75   QList<QTcpSocket*>*     _nmeaSockets;
    7376   QList<QByteArray>       _staIDs;
    7477   QList<bncGetThread*>    _threads;
Note: See TracChangeset for help on using the changeset viewer.