42 #include "FGJSBBase.h"
44 #if defined(_MSC_VER) || defined(__MINGW32__)
73 FGfdmSocket(
const std::string& address,
int port,
int protocol,
int precision = 7);
74 FGfdmSocket(
int port,
int protocol,
int precision = 7);
77 void Send(
const char *data,
int length);
79 std::string Receive(
void);
80 int Reply(
const std::string& text);
81 void Append(
const std::string& s) {Append(s.c_str());}
82 void Append(
const char*);
86 void Clear(
const std::string& s);
88 bool GetConnectStatus(
void) {
return connected;}
89 void WaitUntilReadable(
void);
91 enum ProtocolType {ptUDP, ptTCP};
94 #if defined(_MSC_VER) || defined(__MINGW32__)
101 ProtocolType Protocol;
102 struct sockaddr_in scktName;
103 struct hostent *host;
104 std::ostringstream buffer;
107 void Debug(
int from);