--- /dev/null
+/**************************************************************************
+** (c) Copyright 2012, Andromeda Technology & Automation
+***************************************************************************
+** MODULE INFORMATION *
+***********************
+** FILE NAME : intest.cpp
+** SYSTEM NAME : Network and socket classes - test routine
+** VERSION NUMBER : 0.1
+**
+** DESCRIPTION : Input stream test.
+** Connects to TCP port 1234 and reads a line.
+** Test with: echo "this is a test"|nc -l 1234
+**
+** EXPORTED OBJECTS :
+** LOCAL OBJECTS :
+** MODULES USED :
+***************************************************************************
+** ADMINISTRATIVE INFORMATION *
+********************************
+** ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
+** CREATION DATE : Oct 19, 2012
+** LAST UPDATE : Oct 29, 2012
+** MODIFICATIONS :
+**************************************************************************/
+
+#include "sockstream.h"
+
+
+/*=========================================================================
+** NAME : main
+** SYNOPSIS :
+** PARAMETERS :
+** RETURN VALUE : None
+**
+** DESCRIPTION : Read lines of text from port 1234 and echo these lines
+** to cout.
+**
+** VARS USED :
+** VARS CHANGED :
+** FUNCTIONS USED :
+** SEE ALSO :
+** LAST MODIFIED : Oct 29, 2012
+**=========================================================================
+*/
+
+int main()
+{
+ IPSocketAddress serveraddress(InternetAddress("127.0.0.1"), Port(1234));
+
+ StreamSocket s;
+
+ s.Connect(serveraddress);
+ isockstream reader(s);
+
+ String buf;
+ while (reader >> buf)
+ {
+ std::cout << buf << "\n";
+ }
+}
+