44 #include <sys/types.h> 45 #include "FGJSBBase.h" 47 #if defined(_MSC_VER) || defined(__MINGW32__) 52 #include <sys/socket.h> 53 #include <netinet/in.h> 54 #include <arpa/inet.h> 57 #include <sys/ioctl.h> 61 # pragma comment (lib,"WSock32.lib") 68 #define ID_FDMSOCKET "$Id: FGfdmSocket.h,v 1.24 2016/04/17 13:13:29 bcoconni Exp $" 98 void Send(
const char *data,
int length);
100 std::string Receive(
void);
101 int Reply(
const std::string& text);
102 void Append(
const std::string& s) {Append(s.c_str());}
103 void Append(
const char*);
107 void Clear(
const std::string& s);
109 bool GetConnectStatus(
void) {
return connected;}
111 enum ProtocolType {ptUDP, ptTCP};
112 enum DirectionType {dIN, dOUT};
117 DirectionType Direction;
118 ProtocolType Protocol;
119 struct sockaddr_in scktName;
120 struct hostent *host;
121 std::ostringstream buffer;
123 void Debug(
int from);
Encapsulates an object that enables JSBSim to communicate via socket (input and/or output)...