Skip to content

Commit

Permalink
Test downloading binary file
Browse files Browse the repository at this point in the history
  • Loading branch information
Xenakios committed Jan 20, 2016
1 parent e7816f0 commit bb0f603
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ void test_netlib()
JNL_HTTPGet netget;
std::vector<char> pagedata;
std::vector<char> tempdata(65536);
netget.connect("http://www.landoleet.org/whatsnew5.txt");
netget.connect("http://www.landoleet.org/reaper512rc2-install.exe");
while (true)
{
int r = netget.run();
Expand All @@ -249,10 +249,15 @@ void test_netlib()
for (int i=0;i<avail;++i)
pagedata.push_back(tempdata[i]);
}
//readbg() << "... ";
Sleep(50);
}
//readbg() << "\n";
if (pagedata.size()>0)
readbg() << pagedata.data();
{
readbg() << pagedata.size() << " bytes downloaded\n";
//readbg() << pagedata.data();
}
}

extern "C"
Expand Down
1 change: 1 addition & 0 deletions main.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
#include "xendynamicsprocessor.h"
#include "mrp_audioaccessor.h"
#include "WDL/WDL/jnetlib/httpget.h"

0 comments on commit bb0f603

Please sign in to comment.