summaryrefslogtreecommitdiffstats
path: root/tests/Network/Google.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/Network/Google.cpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/tests/Network/Google.cpp b/tests/Network/Google.cpp
index 0aa52d025..de5f95e1f 100644
--- a/tests/Network/Google.cpp
+++ b/tests/Network/Google.cpp
@@ -1,11 +1,17 @@
-#include "Globals.h"
+// Google.cpp
+
+// Implements a HTTP download of the google's front page using the LibEvent-based cNetwork API
+#include "Globals.h"
#include <thread>
#include "OSSupport/Event.h"
-
#include "OSSupport/Network.h"
+
+
+
+
/** Connect callbacks that send a HTTP GET request for google.com when connected. */
class cHTTPConnectCallbacks:
public cNetwork::cConnectCallbacks
@@ -35,6 +41,9 @@ public:
};
+
+
+
/** cTCPLink callbacks that dump everything it received to the log. */
class cDumpCallbacks:
public cTCPLink::cCallbacks
@@ -69,7 +78,11 @@ public:
};
-int main() {
+
+
+
+int main()
+{
cEvent evtFinish;
LOGD("Network test: Connecting to google.com:80, reading front page via HTTP.");
@@ -83,3 +96,7 @@ int main() {
evtFinish.Wait();
LOGD("Network test finished");
}
+
+
+
+