--- /dev/null
+/**************************************************************************
+** (c) Copyright 2012, Andromeda Technology & Automation
+***************************************************************************
+** MODULE INFORMATION *
+***********************
+** FILE NAME : http-get.cpp
+** SYSTEM NAME : Network and socket classes - test routine
+** VERSION NUMBER : 0.1
+**
+** DESCRIPTION : Use a Socket object to download a page from an HTTP server.
+**
+** EXPORTED OBJECTS :
+** LOCAL OBJECTS :
+** MODULES USED :
+***************************************************************************
+** ADMINISTRATIVE INFORMATION *
+********************************
+** ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
+** CREATION DATE : Mar 02, 2012
+** LAST UPDATE : Mar 05, 2012
+** MODIFICATIONS :
+**************************************************************************/
+
+
+#include "host.h"
+#include "service.h"
+#include "sockstream.h"
+
+
+/*=========================================================================
+** NAME : main
+** SYNOPSIS :
+** PARAMETERS :
+** RETURN VALUE : None
+**
+** DESCRIPTION :
+**
+** VARS USED :
+** VARS CHANGED :
+** FUNCTIONS USED :
+** SEE ALSO :
+** LAST MODIFIED : Nov 01, 2012
+**=========================================================================
+*/
+
+int main()
+{
+ std::cout << "Finding www.andromeda.nl\n";
+ Host server(String("www.andromeda.nl"));
+ std::list<InternetAddress> iplist = server.FindAddress();
+
+ Service srv("http");
+ std::list<Port> portlist = srv.FindAddress();
+
+ IPSocketAddress serveraddress(iplist.front(), portlist.front());
+ StreamSocket s;
+
+ std::cout << "Connection result = " << s.Connect(serveraddress) << "\n";
+ sockstream http(s);
+
+ http << "GET / HTTP/1.1\n";
+ http << "Host: www.andromeda.nl\n" << std::endl;
+
+ String buf;
+ while (http >> buf)
+ {
+ std::cout << buf << "\n";
+ }
+
+}
+