From a816f564261911c168be1140e7f01def4ddfc8a7 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Sat, 27 Jul 2013 14:01:19 -0400 Subject: Dump huffman, doesnt add much and complicates porting to other languages. Also fix compile error in idtool. --- selftest.cpp | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'selftest.cpp') 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 &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(); -- cgit v1.2.3