]> git.mxchange.org Git - flightgear.git/blobdiff - utils/GPSsmooth/UGear_telnet.cxx
Fix compilation.
[flightgear.git] / utils / GPSsmooth / UGear_telnet.cxx
index 42a40edf41a16949bf6dac9e3b3307e6708549f5..a65c2067eb7578de8413eca60de8ab9c81d18e70 100644 (file)
 // $Id$
 
 
+#include <simgear/io/sg_netChat.hxx>
 #include <simgear/structure/commands.hxx>
 #include <simgear/misc/strutils.hxx>
-#include <simgear/Math/SGMath.hxx>
+#include <simgear/debug/logstream.hxx>
 
+#include <cstdio>
 #include <sstream>
 
-#include <plib/netChat.h>
-
 #include "UGear_command.hxx"
 #include "UGear_telnet.hxx"
 
@@ -41,9 +41,9 @@ using std::ends;
  * Props connection class.
  * This class represents a connection to props client.
  */
-class PropsChannel : public netChat
+class PropsChannel : public simgear::NetChat
 {
-    netBuffer buffer;
+    simgear::NetBuffer buffer;
 
     /**
      * Current property node name.
@@ -188,9 +188,9 @@ UGTelnet::open()
        return false;
     }
 
-    netChannel::open();
-    netChannel::bind( "", port );
-    netChannel::listen( 5 );
+    simgear::NetChannel::open();
+    simgear::NetChannel::bind( "", port );
+    simgear::NetChannel::listen( 5 );
     printf("Telnet server started on port %d\n", port );
 
     enabled = true;
@@ -214,7 +214,7 @@ UGTelnet::close()
 bool
 UGTelnet::process()
 {
-    netChannel::poll();
+    simgear::NetChannel::poll();
     return true;
 }
 
@@ -224,8 +224,8 @@ UGTelnet::process()
 void
 UGTelnet::handleAccept()
 {
-    netAddress addr;
-    int handle = netChannel::accept( &addr );
+    simgear::IPAddress addr;
+    int handle = simgear::NetChannel::accept( &addr );
     printf("Telent server accepted connection from %s:%d\n",
            addr.getHost(), addr.getPort() );
     PropsChannel* channel = new PropsChannel();