-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Module: FGfdmSocket.cpp
Author: Jon S. Berndt
--------------------------------------------------------------------------------
11/08/99 JSB Created
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGfdmSocket.h"
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+static const char *IdSrc = "$Header$";
+static const char *IdHdr = ID_FDMSOCKET;
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
FGfdmSocket::FGfdmSocket(string address, int port)
{
FGfdmSocket::~FGfdmSocket(void)
{
+ #ifndef macintosh
if (sckt) shutdown(sckt,2);
+ #endif
+
#ifdef __BORLANDC__
WSACleanup();
#endif
void FGfdmSocket::Send(void)
{
- int len;
-
buffer += string("\n");
- if ((len = send(sckt,buffer.c_str(),buffer.size(),0)) <= 0) {
+ if ((send(sckt,buffer.c_str(),buffer.size(),0)) <= 0) {
perror("send");
} else {
}