#include <simgear/io/HTTPClient.hxx>
#include <simgear/io/HTTPRequest.hxx>
+#include <simgear/io/raw_socket.hxx>
#include <simgear/timing/timestamp.hxx>
-#include <simgear/misc/sg_sleep.hxx>
using namespace std;
using namespace simgear;
string proxy_host, proxy_port;
getproxy(proxy_host, proxy_port);
+ Socket::initSockets();
+
HTTP::Client http;
http.setProxy(proxy_host, atoi(proxy_port.c_str()));
try {
MetarRequest* mr = new MetarRequest(argv[i]);
+ HTTP::Request_ptr own(mr);
http.makeRequest(mr);
// spin until the request completes, fails or times out
if (mr->complete || mr->failed) {
break;
}
- sleepForMSec(1);
+ SGTimeStamp::sleepForMSec(1);
}
if (!mr->complete) {