-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Module: FGfdmSocket.cpp
Author: Jon S. Berndt
--------------------------------------------------------------------------------
11/08/99 JSB Created
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGfdmSocket.h"
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+static const char *IdSrc = "$Id$";
+static const char *IdHdr = ID_FDMSOCKET;
+
+extern short debug_lvl;
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
FGfdmSocket::FGfdmSocket(string address, int port)
{
cout << "Could not create socket for FDM, error = " << errno << endl;
}
}
+
+ if (debug_lvl & 2) cout << "Instantiated: FGfdmSocket" << endl;
}
-FGfdmSocket::~FGfdmSocket(void)
+FGfdmSocket::~FGfdmSocket()
{
+ #ifndef macintosh
if (sckt) shutdown(sckt,2);
+ #endif
+
#ifdef __BORLANDC__
WSACleanup();
#endif