summaryrefslogtreecommitdiff
path: root/selftest.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-07-27 14:01:19 -0400
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-07-27 14:01:19 -0400
commita816f564261911c168be1140e7f01def4ddfc8a7 (patch)
treec7f664c7eea251e7576e2f6015dabd4af675bc30 /selftest.cpp
parente6e825da706f6a59e597aac7ab65b846ea3a7fd4 (diff)
downloadinfinitytier-a816f564261911c168be1140e7f01def4ddfc8a7.tar.gz
infinitytier-a816f564261911c168be1140e7f01def4ddfc8a7.zip
Dump huffman, doesnt add much and complicates porting to other languages. Also fix compile error in idtool.
Diffstat (limited to 'selftest.cpp')
-rw-r--r--selftest.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/selftest.cpp b/selftest.cpp
index dffd22cd..4377d837 100644
--- a/selftest.cpp
+++ b/selftest.cpp
@@ -43,7 +43,6 @@
#include "node/HMAC.hpp"
#include "node/MAC.hpp"
#include "node/Peer.hpp"
-#include "node/Http.hpp"
#include "node/Condition.hpp"
#include "node/NodeConfig.hpp"
@@ -302,39 +301,12 @@ static int testOther()
return 0;
}
-static Condition testHttpDoneCondition;
-
-static bool testHttpHandler(Http::Request *req,void *arg,const std::string &url,int code,const std::map<std::string,std::string> &headers,const std::string &body)
-{
- if (code)
- std::cout << "[net] " << url << " " << code << " bytes: " << body.length() << std::endl;
- else std::cout << "[net] " << url << " FAILED: " << body << std::endl;
- testHttpDoneCondition.signal();
- return false;
-}
-
-static int testNet()
-{
- std::cout << "[net] GET http://www.uc.edu/" << std::endl;
- new Http::Request(Http::HTTP_METHOD_GET,"http://www.uc.edu/",Http::EMPTY_HEADERS,std::string(),&testHttpHandler,(void *)0);
- testHttpDoneCondition.wait();
- std::cout << "[net] GET http://zerotier.com/" << std::endl;
- new Http::Request(Http::HTTP_METHOD_GET,"http://zerotier.com/",Http::EMPTY_HEADERS,std::string(),&testHttpHandler,(void *)0);
- testHttpDoneCondition.wait();
- std::cout << "[net] GET http://www.google.com/" << std::endl;
- new Http::Request(Http::HTTP_METHOD_GET,"http://www.google.com/",Http::EMPTY_HEADERS,std::string(),&testHttpHandler,(void *)0);
- testHttpDoneCondition.wait();
-
- return 0;
-}
-
int main(int argc,char **argv)
{
int r = 0;
srand(time(0));
- r |= testNet();
r |= testCrypto();
r |= testPacket();
r |= testOther();