Changeset 2183 in ntrip


Ignore:
Timestamp:
Jan 4, 2010, 3:45:04 PM (15 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bnccaster.cpp

    r2182 r2183  
    105105    _uServer  = 0;
    106106    _uSockets = 0;
     107  }
     108
     109  int nmeaPort = settings.value("nmeaPort").toInt();
     110  if (nmeaPort != 0) {
     111    _nmeaServer = new QTcpServer;
     112    if ( !_nmeaServer->listen(QHostAddress::Any, nmeaPort) ) {
     113      emit newMessage("bncCaster: Cannot listen on port", true);
     114    }
     115    connect(_nmeaServer, SIGNAL(newConnection()), this, SLOT(slotNewNMEAConnection()));
     116    _nmeaSockets = new QList<QTcpSocket*>;
     117  }
     118  else {
     119    _nmeaServer  = 0;
     120    _nmeaSockets = 0;
    107121  }
    108122
     
    233247  emit( newMessage(QString("New client connection on usync port: # %1")
    234248                   .arg(_uSockets->size()).toAscii(), true) );
     249}
     250
     251void bncCaster::slotNewNMEAConnection() {
     252  _nmeaSockets->push_back( _nmeaServer->nextPendingConnection() );
     253  emit( newMessage(QString("New PPP client on port: # %1")
     254                   .arg(_nmeaSockets->size()).toAscii(), true) );
    235255}
    236256
Note: See TracChangeset for help on using the changeset viewer.