Changeset 1532 in ntrip
- Timestamp:
- Jan 21, 2009, 1:57:27 PM (16 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncnetqueryrtp.cpp
r1531 r1532 46 46 _eventLoop->quit(); 47 47 _status = finished; 48 QByteArray reqStr = "TEARDOWN " + _url.toEncoded() + " RTSP/1.0\r\n" 49 + "CSeq: " + QString("%1").arg(++_CSeq).toAscii() + "\r\n" 50 + "Session: " + _session + "\r\n" 51 + "\r\n"; 52 _socket->write(reqStr, reqStr.length()); 48 if (_socket) { 49 QByteArray reqStr = "TEARDOWN " + _url.toEncoded() + " RTSP/1.0\r\n" 50 + "CSeq: " + QString("%1").arg(++_CSeq).toAscii() + "\r\n" 51 + "Session: " + _session + "\r\n" 52 + "\r\n"; 53 _socket->write(reqStr, reqStr.length()); 54 } 55 } 56 57 // 58 //////////////////////////////////////////////////////////////////////////// 59 void bncNetQueryRtp::slotKeepAlive() { 60 if (_socket) { 61 QByteArray reqStr = "GET_PARAMETER " + _url.toEncoded() + " RTSP/1.0\r\n" 62 + "CSeq: " + QString("%1").arg(++_CSeq).toAscii() + "\r\n" 63 + "Session: " + _session + "\r\n" 64 + "\r\n"; 65 _socket->write(reqStr, reqStr.length()); 66 } 67 QTimer::singleShot(30000, this, SLOT(slotKeepAlive())); 53 68 } 54 69 … … 200 215 _url.path().toAscii() + 201 216 ": UDP connection established", true); 217 slotKeepAlive(); 202 218 return; 203 219 } -
trunk/BNC/bncnetqueryrtp.h
r1531 r1532 5 5 6 6 class bncNetQueryRtp : public bncNetQuery { 7 Q_OBJECT 7 8 public: 8 9 bncNetQueryRtp(); … … 13 14 virtual void startRequest(const QUrl& url, const QByteArray& gga); 14 15 virtual void waitForReadyRead(QByteArray& outData); 16 17 private slots: 18 void slotKeepAlive(); 15 19 16 20 private:
Note:
See TracChangeset
for help on using the changeset viewer.