Changeset 1418 in ntrip
- Timestamp:
- Dec 31, 2008, 2:46:05 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncnetqueryrtp.cpp
r1417 r1418 113 113 passW.toAscii()).toBase64() + "\r\n"; 114 114 } 115 116 // Find a free port number 117 // ----------------------- 118 int clientPortInt = 0; 119 QTcpSocket* hlpSocket = new QTcpSocket(); 120 if ( proxyHost.isEmpty() ) { 121 hlpSocket->connectToHost(urlLoc.host(), urlLoc.port()); 122 } 123 else { 124 hlpSocket->connectToHost(proxyHost, proxyPort); 125 } 126 if (hlpSocket->waitForConnected(timeOut)) { 127 clientPortInt = hlpSocket->localPort(); 128 } 129 delete hlpSocket; 115 130 116 QByteArray clientPort = "7777"; // TODO: make it an option131 QByteArray clientPort = QString("%1").arg(clientPortInt).toAscii(); 117 132 delete _udpSocket; 118 133 _udpSocket = new QUdpSocket(); 119 _udpSocket->bind(clientPort .toInt());134 _udpSocket->bind(clientPortInt); 120 135 connect(_udpSocket, SIGNAL(readyRead()), _eventLoop, SLOT(quit())); 121 136
Note:
See TracChangeset
for help on using the changeset viewer.