]> git.mxchange.org Git - simgear.git/blobdiff - simgear/io/tcp_client.cxx
Drop explicit SDK setting on Mac
[simgear.git] / simgear / io / tcp_client.cxx
index 78548f53276d554f61a316598ca781bb4fcb623e..4bd9b945a54696273eca0325014e35c5f27c8f03 100644 (file)
@@ -1,14 +1,18 @@
 #include <simgear/compiler.h>
-#include STL_IOSTREAM
+#include <iostream>
+
+#ifdef _WIN32
+#include <windows.h>
+#else
 #include <unistd.h>
+#endif
+
+#include <iostream>
 
 #include <simgear/debug/logstream.hxx>
 
 #include "sg_socket.hxx"
 
-#ifndef SG_HAVE_NATIVE_SGI_COMPILERS
-using std::cout;
-#endif
 
 class TcpClient
 {
@@ -47,7 +51,7 @@ TcpClient::process()
 
     sprintf( wbuf, "hello world\n" );
     int length = channel->writestring( wbuf );
-    cout << "writestring returned " << length << "\n";
+    std::cout << "writestring returned " << length << "\n";
 
     return true;
 }
@@ -65,14 +69,18 @@ main()
     TcpClient client( "localhost", "5500" );
     if (!client.open())
     {
-       cout << "client open failed\n";
+        std::cout << "client open failed\n";
        return 0;
     }
 
     for (int i = 0; i < 3; ++i)
     {
        client.process();
+#ifdef _WIN32
+        Sleep(1000);
+#else
        sleep(1);
+#endif
     }
 
     //client.close();