Changeset 380 in ntrip


Ignore:
Timestamp:
Jan 26, 2007, 3:36:00 PM (18 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/test_bnc_qt.cpp

    r379 r380  
    2929
    3030  while (true) {
    31     socket.waitForReadyRead(1000);
    3231    if ( socket.bytesAvailable() ) {
    3332      int bytesRecv = socket.read(&flag, 1);
    3433      if (flag == begObs) {
    35         socket.waitForReadyRead(1000);
    36         if ( socket.bytesAvailable() ) {
     34        if ( socket.bytesAvailable() >= sizeof(obs) ) {
    3735          bytesRecv = socket.read((char*) &obs, sizeof(obs));
    3836          cout << setw(5)                     << obs.StatID         << " "
     
    5351      }
    5452    }
     53    else {
     54      socket.waitForReadyRead(100);
     55    }
    5556  }
    5657
Note: See TracChangeset for help on using the changeset viewer.