Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\src;..\..\..\..\SimGear;..\..\..\..\install\msvc90\OpenSceneGraph\include;..\..\..\..\3rdParty\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;HAVE_WINDOWS_H"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\src;..\..\..\..\SimGear;..\..\..\..\install\msvc90-64\OpenSceneGraph\include;..\..\..\..\3rdParty.x64\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;HAVE_WINDOWS_H"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\..\src;..\..\..\..\SimGear;..\..\..\..\install\msvc90\OpenSceneGraph\include;..\..\..\..\3rdParty\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;HAVE_WINDOWS_H"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\..\src;..\..\..\..\SimGear;..\..\..\..\install\msvc90-64\OpenSceneGraph\include;..\..\..\..\3rdParty\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;HAVE_WINDOWS_H"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\src;..\..\..\..\SimGear;..\..\..\..\install\msvc90\OpenSceneGraph\include;..\..\..\..\3rdParty\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;HAVE_WINDOWS_H"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\src;..\..\..\..\SimGear;..\..\..\..\install\msvc90-64\OpenSceneGraph\include;..\..\..\..\3rdParty.x64\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;HAVE_WINDOWS_H"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\..\src;..\..\..\..\SimGear;..\..\..\..\install\msvc90\OpenSceneGraph\include;..\..\..\..\3rdParty\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;HAVE_WINDOWS_H"
RuntimeLibrary="2"
RuntimeTypeInfo="true"
UsePrecompiledHeader="0"
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\..\src;..\..\..\..\SimGear;..\..\..\..\install\msvc90-64\OpenSceneGraph\include;..\..\..\..\3rdParty.x64\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;HAVE_WINDOWS_H"
RuntimeLibrary="2"
RuntimeTypeInfo="true"
UsePrecompiledHeader="0"
Name="VCCLCompilerTool"\r
Optimization="0"\r
AdditionalIncludeDirectories="..\..\..\src;..\..\..\..\SimGear;..\..\..\..\install\msvc90\OpenSceneGraph\include;..\..\..\..\3rdParty\include;..\..\..\..\boost_1_44_0"\r
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS"\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;HAVE_WINDOWS_H"\r
MinimalRebuild="true"\r
BasicRuntimeChecks="3"\r
RuntimeLibrary="3"\r
Name="VCCLCompilerTool"\r
Optimization="0"\r
AdditionalIncludeDirectories="..\..\..\src;..\..\..\..\SimGear;..\..\..\..\install\msvc90-64\OpenSceneGraph\include;..\..\..\..\3rdParty.x64\include;..\..\..\..\boost_1_44_0"\r
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS"\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;HAVE_WINDOWS_H"\r
MinimalRebuild="true"\r
BasicRuntimeChecks="3"\r
RuntimeLibrary="3"\r
<Tool\r
Name="VCCLCompilerTool"\r
AdditionalIncludeDirectories="..\..\..\src;..\..\..\..\SimGear;..\..\..\..\install\msvc90\OpenSceneGraph\include;..\..\..\..\3rdParty\include;..\..\..\..\boost_1_44_0"\r
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS"\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;HAVE_WINDOWS_H"\r
RuntimeLibrary="2"\r
RuntimeTypeInfo="true"\r
UsePrecompiledHeader="0"\r
<Tool\r
Name="VCCLCompilerTool"\r
AdditionalIncludeDirectories="..\..\..\src;..\..\..\..\SimGear;..\..\..\..\install\msvc90-64\OpenSceneGraph\include;..\..\..\..\3rdParty.x64\include;..\..\..\..\boost_1_44_0"\r
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS"\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;HAVE_WINDOWS_H"\r
RuntimeLibrary="2"\r
RuntimeTypeInfo="true"\r
UsePrecompiledHeader="0"\r
# include <config.h>
#endif
+#ifdef HAVE_WINDOWS_H
+# include <windows.h>
+#endif
+
#include <iostream>
#include <string>
-#include <plib/net.h>
#include <plib/sg.h>
#include <simgear/constants.h>
#include <simgear/io/lowlevel.hxx> // endian tests
#include <simgear/io/sg_file.hxx>
#include <simgear/io/sg_serial.hxx>
+#include <simgear/io/raw_socket.hxx>
#include <simgear/math/sg_geodesy.hxx>
#include <simgear/timing/timestamp.hxx>
// Network channels
-static netSocket fdm_sock, ctrls_sock;
+static simgear::Socket fdm_sock, ctrls_sock;
// midg data
MIDGTrack track;
// Setup up outgoing network connections
- netInit( &argc,argv ); // We must call this before any other net stuff
+ simgear::Socket::initSockets(); // We must call this before any other net stuff
if ( ! fdm_sock.open( false ) ) { // open a UDP socket
cout << "error opening fdm output socket" << endl;
# include <config.h>
#endif
+#ifdef HAVE_WINDOWS_H
+# include <windows.h>
+#endif
+
#ifndef _WIN32
# include <strings.h> // for bzero()
#else
#include <iostream>
#include <string>
-#include <plib/net.h>
#include <plib/sg.h>
#include <simgear/constants.h>
#include <simgear/io/lowlevel.hxx> // endian tests
#include <simgear/io/sg_file.hxx>
+#include <simgear/io/raw_socket.hxx>
#include <simgear/serial/serial.hxx>
#include <simgear/math/sg_geodesy.hxx>
#include <simgear/timing/timestamp.hxx>
// Network channels
-static netSocket fdm_sock, ctrls_sock, opengc_sock;
+static simgear::Socket fdm_sock, ctrls_sock, opengc_sock;
// ugear data
UGTrack track;
// Setup up outgoing network connections
- netInit( &argc,argv ); // We must call this before any other net stuff
+ simgear::Socket::initSockets(); // We must call this before any other net stuff
if ( ! opengc_sock.open( false ) ) { // open a UDP socket
cout << "error opening opengc output socket" << endl;
// $Id$
+#include <simgear/io/sg_netChat.hxx>
#include <simgear/structure/commands.hxx>
#include <simgear/misc/strutils.hxx>
#include <simgear/math/SGMath.hxx>
#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();
using std::string;
using std::vector;
-#include <plib/netChannel.h>
+#include <simgear/io/sg_netChannel.hxx>
/**
* This class provides a telnet-like server for remote access to
* FlightGear properties.
*/
-class UGTelnet: netChannel
+class UGTelnet: simgear::NetChannel
{
private:
# include <config.h>
#endif
+#ifdef HAVE_WINDOWS_H
+# include <windows.h>
+#endif
+
#include <iostream>
#include <string>
-#include <plib/net.h>
#include <plib/sg.h>
#include <simgear/io/lowlevel.hxx> // endian tests
+#include <simgear/io/raw_socket.hxx>
#include <simgear/timing/timestamp.hxx>
#include <Network/net_ctrls.hxx>
// Network channels
-static netSocket fdm_sock, ctrls_sock;
+static simgear::Socket fdm_sock, ctrls_sock;
// gps data
GPSTrack track;
// Setup up outgoing network connections
- netInit( &argc,argv ); // We must call this before any other net stuff
+ simgear::Socket::initSockets(); // We must call this before any other net stuff
if ( ! fdm_sock.open( false ) ) { // open a UDP socket
cout << "error opening fdm output socket" << endl;