// $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"
* 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.
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;
bool
UGTelnet::process()
{
- netChannel::poll();
+ simgear::NetChannel::poll();
return true;
}
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();