Changeset 8231 in ntrip for trunk/BNC/src/bncnetqueryrtp.cpp
- Timestamp:
- Jan 4, 2018, 10:23:05 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncnetqueryrtp.cpp
r8203 r8231 11 11 * Created: 27-Dec-2008 12 12 * 13 * Changes: 13 * Changes: 14 14 * 15 15 * -----------------------------------------------------------------------*/ … … 41 41 } 42 42 43 // 43 // 44 44 //////////////////////////////////////////////////////////////////////////// 45 45 void bncNetQueryRtp::stop() { … … 55 55 } 56 56 57 // 57 // 58 58 //////////////////////////////////////////////////////////////////////////// 59 59 void bncNetQueryRtp::slotKeepAlive() { … … 68 68 } 69 69 70 // 70 // 71 71 //////////////////////////////////////////////////////////////////////////// 72 72 void bncNetQueryRtp::waitForRequestResult(const QUrl&, QByteArray&) { 73 73 } 74 74 75 // 75 // 76 76 //////////////////////////////////////////////////////////////////////////// 77 77 void bncNetQueryRtp::waitForReadyRead(QByteArray& outData) { … … 115 115 QString proxyHost = settings.value("proxyHost").toString(); 116 116 int proxyPort = settings.value("proxyPort").toInt(); 117 117 118 118 if ( proxyHost.isEmpty() ) { 119 119 _socket->connectToHost(_url.host(), _url.port()); … … 129 129 QString passW = QUrl::fromPercentEncoding(_url.password().toLatin1()); 130 130 QByteArray userAndPwd; 131 131 132 132 if(!uName.isEmpty() || !passW.isEmpty()) { 133 133 userAndPwd = "Authorization: Basic " + (uName.toLatin1() + ":" + … … 157 157 158 158 _socket->write(reqStr, reqStr.length()); 159 159 160 160 // Read Server Answer 1 161 161 // -------------------- … … 175 175 line = in.readLine(); 176 176 } 177 177 178 178 // Send Request 2 179 179 // -------------- 180 if (!_session.isEmpty()) { 180 if (!_session.isEmpty()) { 181 181 182 182 // Send initial RTP packet for firewall handling … … 198 198 rtpbuffer[11] = (sessInt ) & 0xFF; 199 199 200 _udpSocket->writeDatagram(rtpbuffer, 12, 200 _udpSocket->writeDatagram(rtpbuffer, 12, 201 201 _socket->peerAddress(), serverPort.toInt()); 202 202 } … … 207 207 + "\r\n"; 208 208 _socket->write(reqStr, reqStr.length()); 209 209 210 210 // Read Server Answer 2 211 211 // -------------------- … … 216 216 while (!line.isEmpty()) { 217 217 if (line.indexOf("200 OK") != -1) { 218 emit newMessage(_url. encodedPath().replace(0,1,"")218 emit newMessage(_url.toEncoded().replace(0,1,"") 219 219 + ": UDP connection established", true); 220 220 slotKeepAlive(); … … 233 233 _socket = 0; 234 234 _status = error; 235 emit newMessage(_url. encodedPath().replace(0,1,"")235 emit newMessage(_url.toEncoded().replace(0,1,"") 236 236 + ": NetQuery, waiting for connect", true); 237 237 }
Note:
See TracChangeset
for help on using the changeset viewer.