]> git.mxchange.org Git - flightgear.git/commitdiff
Multiplayer client/server system changes and new files
authorcvsguest <cvsguest>
Fri, 7 Nov 2003 23:38:18 +0000 (23:38 +0000)
committercvsguest <cvsguest>
Fri, 7 Nov 2003 23:38:18 +0000 (23:38 +0000)
12 files changed:
configure.ac
src/Main/Makefile.am
src/Makefile.am
src/Server/Makefile.am [new file with mode: 0644]
src/Server/buftest.cxx [new file with mode: 0644]
src/Server/message.cxx [new file with mode: 0644]
src/Server/message.hxx [new file with mode: 0644]
src/Server/messagebuf.cxx [new file with mode: 0644]
src/Server/messagebuf.hxx [new file with mode: 0644]
src/Server/msg_0001_hello.cxx [new file with mode: 0644]
src/Server/msg_0001_hello.hxx [new file with mode: 0644]
src/Server/msgtest.cxx [new file with mode: 0644]

index 490ddecf8e85fb622fdcc9757363ca0a40b02e90..daacc73eb6e3b74303076c81849945f65fd7183d 100644 (file)
@@ -79,6 +79,16 @@ fi
 AM_CONDITIONAL(ENABLE_NETWORK_OLK, test "x$with_network_olk" != "xno" -a "x$with_multiplayer" = "xno")
 AM_CONDITIONAL(ENABLE_MPLAYER_AS, test "x$with_multiplayer" != "xno")
 
+AC_ARG_WITH(multiserver, [  --with-multiserver      Include multiplayer client/server support])
+
+if test "x$with_multiserver" = "xno"; then
+  echo "Building without multiplayer client/server support"
+else
+  echo "Building with multiplayer client/server support"
+  AC_DEFINE([FG_MSERVER_AS], 1, [Define to build with multiplayer client/server support])
+fi
+
+AM_CONDITIONAL(ENABLE_MSERVER_AS, test "x$with_multiserver" != "xno")
 
 # Specify if we want to use WeatherCM instead of FGEnvironment.
 # default to with_weathercm=no
@@ -546,6 +556,7 @@ AC_CONFIG_FILES([ \
        src/Replay/Makefile \
        src/Scenery/Makefile \
        src/Scripting/Makefile \
+       src/Server/Makefile \
        src/Sound/Makefile \
        src/Systems/Makefile \
        src/Time/Makefile \
@@ -595,6 +606,10 @@ elif test "x$with_network_olk" != "xno"; then
     echo "Using Oliver's multi-pilot network support"
 fi
 
+if test "x$with_multiserver" != "xno"; then
+    echo "Using multiplayer client/server support"
+fi
+
 if test "x$with_threads" = "xyes"; then
     echo "threads: yes"
 else
index a5492ddb015ac28fd6084c87aa8c49339ead3f03..36447d542be167b9165c83eaef686e1d043e3a7e 100644 (file)
@@ -10,6 +10,14 @@ else
 MPLAYER_LIBS = 
 endif
 
+if ENABLE_MSERVER_AS
+MSERVER_LIBS = $(top_builddir)/src/Server/libServer.a
+MSERVER_BINS = fgmp
+else
+MSERVER_LIBS = 
+MSERVER_BINS = 
+endif
+
 if ENABLE_NETWORK_OLK
 NETWORK_LIBS = $(top_builddir)/src/NetworkOLK/libNetworkOLK.a
 else
@@ -40,7 +48,7 @@ AM_CXXFLAGS = -DPKGLIBDIR=\"$(pkglibdir)\"
 
 EXTRA_DIST = 3dfx.sh runfgfs.in runfgfs.bat.in
 
-bin_PROGRAMS = fgfs
+bin_PROGRAMS = fgfs $(MSERVER_BINS)
 
 noinst_SCRIPTS = runfgfs.bat runfgfs
 
@@ -110,4 +118,12 @@ fgfs_LDADD = \
        $(opengl_LIBS) \
        $(audio_LIBS)
 
+if ENABLE_MSERVER_AS
+
+fgmp_SOURCES = bootstrap.cxx
+
+fgmp_LDADD = $(fgfs_LDADD) $(MSERVER_LIBS)
+
+endif
+
 INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src
index d88af9347d08c9fa2a49669cbebeb127558d7342..10470774c1a878211f81e15417eef8b7a018a211 100644 (file)
@@ -16,6 +16,12 @@ else
 MPLAYER_DIRS =
 endif
 
+if ENABLE_MSERVER_AS
+MSERVER_DIRS = Server
+else
+MSERVER_DIRS =
+endif
+
 if ENABLE_NETWORK_OLK
 NETWORK_DIRS = NetworkOLK
 else
@@ -38,6 +44,7 @@ SUBDIRS = \
         Navaids \
         Network \
        $(MPLAYER_DIRS) \
+       $(MSERVER_DIRS) \
         $(NETWORK_DIRS) \
         Objects \
        Replay \
diff --git a/src/Server/Makefile.am b/src/Server/Makefile.am
new file mode 100644 (file)
index 0000000..4b55b0d
--- /dev/null
@@ -0,0 +1,36 @@
+noinst_LIBRARIES = libServer.a
+noinst_PROGRAMS = buftest msgtest
+
+if ENABLE_MSERVER_AS
+
+MSERVER_AS = \
+       msg_0001_hello.cxx \
+       msg_0001_hello.hxx \
+       messagebuf.cxx \
+       messagebuf.hxx \
+       message.cxx \
+       message.hxx
+
+MSERVER_BUF = buftest.cxx
+
+MSERVER_MSG = msgtest.cxx
+       
+else
+
+MSERVER_AS =
+
+MSERVER_BUF = 
+
+MSERVER_MSG = 
+
+endif
+
+libServer_a_SOURCES = $(MSERVER_AS) 
+
+buftest_SOURCES = $(MSERVER_BUF)
+buftest_LDADD = libServer.a
+
+msgtest_SOURCES = $(MSERVER_MSG)
+msgtest_LDADD = libServer.a
+
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src
diff --git a/src/Server/buftest.cxx b/src/Server/buftest.cxx
new file mode 100644 (file)
index 0000000..f7bbe05
--- /dev/null
@@ -0,0 +1,74 @@
+#include "message.hxx"\r
+\r
+main(int argc, char **argv)\r
+{\r
+       FGMPSMessageBuf buf1, buf2;\r
+\r
+       buf1.clr();\r
+       buf1.put(fgmps_som8, true);\r
+       buf1.put(1);\r
+       for (int i=0; i<256; i++) {\r
+               buf1.put(fgmps_uchar, true);\r
+               buf1.put(i);\r
+       }\r
+       buf1.put(fgmps_eom, true);\r
+\r
+       buf2.set(buf1.str());\r
+\r
+       bool done=false;\r
+       while (!done) {\r
+               unsigned char           mid8, uval8;\r
+               unsigned int            mid16, uval16;\r
+               unsigned long           uval32;\r
+               unsigned long long      uval64;\r
+               char                    val8;\r
+               int                     val16;\r
+               long                    val32;\r
+               long long               val64;\r
+               float                   valf;\r
+               double                  vald;\r
+               string                  vals;\r
+               printf("dump: ");\r
+               for (int i=0; i<16; i++) printf("%02x ", buf2.peek(i));\r
+               printf("\n");\r
+               try {\r
+                       int tag = buf2.get(true);\r
+                       switch (tag) {\r
+                       case fgmps_som8:\r
+                               mid8 = *(unsigned char *)buf2.read1();\r
+                               printf("Start Message ID = %02x\n", mid8);\r
+                               break;\r
+                       case fgmps_som16:\r
+                               mid16 = *(unsigned int *)buf2.read2();\r
+                               printf("Start Message ID = %04x\n", mid16);\r
+                               break;\r
+                       case fgmps_eom:\r
+                               printf("End Of Message\n", tag);\r
+                               done = true;\r
+                               break;\r
+                       case fgmps_uchar:\r
+                               uval8 = *(unsigned char *)buf2.read1();\r
+                               printf("uchar = %02x\n", uval8);\r
+                               break;\r
+                       case fgmps_uint:\r
+                               uval16 = *(unsigned int *)buf2.read2();\r
+                               printf("uint = %04x\n", uval16);\r
+                               break;\r
+                       case fgmps_ulong:\r
+                               uval32 = *(unsigned long *)buf2.read4();\r
+                               printf("ulong = %08lx\n", uval32);\r
+                               break;\r
+                       case fgmps_ulonglong:\r
+                               uval64 = *(unsigned long long *)buf2.read8();\r
+                               printf("ulonglong = %16llx\n", uval64);\r
+                               break;\r
+                       default:\r
+                               printf("Unknown prefix = %02x\n", tag);\r
+                               done = true;\r
+                               break;\r
+                       }\r
+               } catch (FGMPSDataException e) {\r
+                       done = true;\r
+               }\r
+       }\r
+}\r
diff --git a/src/Server/message.cxx b/src/Server/message.cxx
new file mode 100644 (file)
index 0000000..e06964c
--- /dev/null
@@ -0,0 +1,34 @@
+// message.hxx -- Multiplayer Client/Server message base class\r
+//\r
+// Written by John Barrett, started November 2003.\r
+//\r
+// Copyright (C) 2003  John R. Barrett - jbarrett@accesshosting.com\r
+//\r
+// This program is free software; you can redistribute it and/or\r
+// modify it under the terms of the GNU General Public License as\r
+// published by the Free Software Foundation; either version 2 of the\r
+// License, or (at your option) any later version.\r
+//\r
+// This program is distributed in the hope that it will be useful, but\r
+// WITHOUT ANY WARRANTY; without even the implied warranty of\r
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+// General Public License for more details.\r
+//\r
+// You should have received a copy of the GNU General Public License\r
+// along with this program; if not, write to the Free Software\r
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
+//\r
+\r
+\r
+#include "message.hxx"\r
+\r
+FGMPSMessage::FGMPSMessage() \r
+{\r
+       msgid = 0x0000;\r
+       elements[0].type = fgmps_null;\r
+       elements[0].data = NULL;        \r
+       \r
+}\r
+\r
+\r
+\r
diff --git a/src/Server/message.hxx b/src/Server/message.hxx
new file mode 100644 (file)
index 0000000..35c7e51
--- /dev/null
@@ -0,0 +1,83 @@
+// message.hxx -- Multiplayer Client/Server message base class\r
+//\r
+// Written by John Barrett, started November 2003.\r
+//\r
+// Copyright (C) 2003  John R. Barrett - jbarrett@accesshosting.com\r
+//\r
+// This program is free software; you can redistribute it and/or\r
+// modify it under the terms of the GNU General Public License as\r
+// published by the Free Software Foundation; either version 2 of the\r
+// License, or (at your option) any later version.\r
+//\r
+// This program is distributed in the hope that it will be useful, but\r
+// WITHOUT ANY WARRANTY; without even the implied warranty of\r
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+// General Public License for more details.\r
+//\r
+// You should have received a copy of the GNU General Public License\r
+// along with this program; if not, write to the Free Software\r
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
+//\r
+\r
+\r
+#ifndef _FG_MPS_MESSAGE_HXX\r
+#define _FG_MPS_MESSAGE_HXX\r
+\r
+#include <simgear/compiler.h>\r
+\r
+#include STL_STRING\r
+#include <stdexcept>\r
+\r
+SG_USING_STD(string);\r
+SG_USING_STD(invalid_argument);\r
+\r
+#include "messagebuf.hxx"\r
+\r
+typedef enum \r
+{\r
+       fgmps_null      = 0x00,\r
+       fgmps_uchar     = 0xf0,\r
+       fgmps_uint      = 0xf1,\r
+       fgmps_ulong     = 0xf2,\r
+       fgmps_ulonglong = 0xf3,\r
+       fgmps_char      = 0xf4,\r
+       fgmps_int       = 0xf5,\r
+       fgmps_long      = 0xf6,\r
+       fgmps_longlong  = 0xf7,\r
+       fgmps_float     = 0xf8,\r
+       fgmps_double    = 0xf9,\r
+       fgmps_string    = 0xfa,\r
+       fgmps_reserved  = 0xfb,\r
+       fgmps_eom       = 0xfc,\r
+       fgmps_som8      = 0xfd,\r
+       fgmps_som16     = 0xfe,\r
+       fgmps_esc       = 0xfe\r
+} FGMPSMsgElementType;\r
+\r
+typedef struct \r
+{\r
+       FGMPSMsgElementType     type;\r
+       void *                  data;\r
+} FGMPSMsgElementEntry;\r
+\r
+#define FGMPSMsgElementArrayEnd {fgmps_null, 0}\r
+\r
+class FGMPSMessage\r
+{\r
+private:\r
+       FGMPSMsgElementEntry            elements[1];\r
+       static unsigned int             msgid;\r
+protected:\r
+       FGMPSMessageBuf                 msg;\r
+public:\r
+       FGMPSMessage();\r
+       ~FGMPSMessage() {}\r
+\r
+       virtual string                  encodemsg() {}\r
+       virtual FGMPSMessage*           decodemsg(string msg) {}\r
+       virtual FGMPSMsgElementEntry*   getelements() { return elements; }\r
+       virtual unsigned int            getmessageid() { return msgid; }\r
+\r
+};\r
+\r
+#endif\r
diff --git a/src/Server/messagebuf.cxx b/src/Server/messagebuf.cxx
new file mode 100644 (file)
index 0000000..f5ff9f2
--- /dev/null
@@ -0,0 +1,137 @@
+#include "messagebuf.hxx"\r
+\r
+#include <netinet/in.h>\r
+\r
+unsigned char FGMPSMessageBuf::get(bool raw)\r
+{\r
+       if (pos >= buf.length())\r
+               throw FGMPSDataException( "FGMPSMessageBuf: Read past end of buffer" );\r
+       if (raw) return buf[pos++];\r
+       if ((unsigned char)buf[pos] == 0xff) {\r
+               pos++;\r
+               return ((unsigned char)buf[pos++] ^ 0xff);\r
+       }\r
+       return buf[pos++];\r
+}\r
+\r
+void FGMPSMessageBuf::put(unsigned char byte, bool raw)\r
+{\r
+       if (!raw) {\r
+               if ((byte & 0xf0) == 0xf0) {\r
+                       buf += 0xff;\r
+                       byte = byte ^ 0xff;\r
+               }\r
+       }\r
+       buf += byte;\r
+}\r
+\r
+void FGMPSMessageBuf::write1(void* data)\r
+{\r
+       put(*(unsigned char *)data);\r
+}\r
+\r
+void FGMPSMessageBuf::write2(void* data)\r
+{\r
+       *((uint16_t*)tmp) = htons(*((uint16_t*)data));\r
+       put(tmp[0]); \r
+       put(tmp[1]); \r
+}\r
+\r
+void FGMPSMessageBuf::write4(void* data)\r
+{\r
+       *((uint32_t*)tmp) = htonl(*((uint32_t*)data));\r
+       put(tmp[0]); \r
+       put(tmp[1]); \r
+       put(tmp[2]); \r
+       put(tmp[3]); \r
+}\r
+\r
+void FGMPSMessageBuf::write8(void* data)\r
+{\r
+       *((uint32_t*)tmp+0) = htonl(*((uint32_t*)data+4));\r
+       *((uint32_t*)tmp+4) = htonl(*((uint32_t*)data+0));\r
+       put(tmp[0]); \r
+       put(tmp[1]); \r
+       put(tmp[2]); \r
+       put(tmp[3]); \r
+       put(tmp[4]); \r
+       put(tmp[5]); \r
+       put(tmp[6]); \r
+       put(tmp[7]); \r
+}\r
+\r
+void FGMPSMessageBuf::writef(float data)\r
+{\r
+       write4(&data);\r
+}\r
+\r
+void FGMPSMessageBuf::writed(double data)\r
+{\r
+       write8(&data);\r
+}\r
+\r
+void FGMPSMessageBuf::writes(string data)\r
+{\r
+       for (int i=0; i<data.length(); i++) put(data[i]);\r
+}\r
+\r
+void* FGMPSMessageBuf::read1()\r
+{\r
+       tmp[0] = get();\r
+       return tmp;\r
+}\r
+\r
+void* FGMPSMessageBuf::read2()\r
+{\r
+       tmp[0] = get();\r
+       tmp[1] = get();\r
+       *((uint16_t*)tmp) = ntohs(*((uint16_t*)tmp));\r
+       return tmp;\r
+}\r
+\r
+void* FGMPSMessageBuf::read4()\r
+{\r
+       tmp[0] = get();\r
+       tmp[1] = get();\r
+       tmp[2] = get();\r
+       tmp[3] = get();\r
+       *((uint32_t*)tmp) = ntohl(*((uint32_t*)tmp));\r
+       return tmp;\r
+}\r
+\r
+void* FGMPSMessageBuf::read8()\r
+{\r
+       unsigned char res[32];\r
+\r
+       res[0] = get();\r
+       res[1] = get();\r
+       res[2] = get();\r
+       res[3] = get();\r
+       res[4] = get();\r
+       res[5] = get();\r
+       res[6] = get();\r
+       res[7] = get();\r
+       *((uint32_t*)tmp+4) = ntohl(*((uint32_t*)res+0));\r
+       *((uint32_t*)tmp+0) = ntohl(*((uint32_t*)res+4));\r
+       return tmp;\r
+}\r
+\r
+float FGMPSMessageBuf::readf()\r
+{\r
+       return *((float*)read4());\r
+}\r
+\r
+double FGMPSMessageBuf::readd()\r
+{\r
+       return *((double*)read8());\r
+}\r
+\r
+string FGMPSMessageBuf::reads(size_t length)\r
+{\r
+       string  res = "";\r
+       for (int i=0; i<length; i++) res += get();\r
+       return res;\r
+}\r
+\r
+\r
+\r
diff --git a/src/Server/messagebuf.hxx b/src/Server/messagebuf.hxx
new file mode 100644 (file)
index 0000000..c905f8b
--- /dev/null
@@ -0,0 +1,92 @@
+// messagebuf.hxx -- Multiplayer Client/Server message buffer class\r
+//\r
+// Written by John Barrett, started November 2003.\r
+//\r
+// Copyright (C) 2003  John R. Barrett - jbarrett@accesshosting.com\r
+//\r
+// This program is free software; you can redistribute it and/or\r
+// modify it under the terms of the GNU General Public License as\r
+// published by the Free Software Foundation; either version 2 of the\r
+// License, or (at your option) any later version.\r
+//\r
+// This program is distributed in the hope that it will be useful, but\r
+// WITHOUT ANY WARRANTY; without even the implied warranty of\r
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+// General Public License for more details.\r
+//\r
+// You should have received a copy of the GNU General Public License\r
+// along with this program; if not, write to the Free Software\r
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
+//\r
+\r
+\r
+#ifndef _FG_MPS_MESSAGEBUF_HXX\r
+#define _FG_MPS_MESSAGEBUF_HXX\r
+\r
+#include <simgear/compiler.h>\r
+\r
+#include STL_STRING\r
+#include <stdexcept>\r
+\r
+SG_USING_STD(string);\r
+SG_USING_STD(invalid_argument);\r
+\r
+class FGMPSDataException : public invalid_argument\r
+{\r
+public:\r
+    FGMPSDataException( const string& what_string )\r
+       : invalid_argument(what_string) {}\r
+};\r
+\r
+class FGMPSMessageBuf \r
+{\r
+\r
+private:\r
+       string          buf;\r
+       size_t          pos;\r
+       unsigned char   tmp[16];\r
+\r
+public:\r
+\r
+       FGMPSMessageBuf()               { init(""); }\r
+       FGMPSMessageBuf(string data)    { init(data); }\r
+\r
+       ~FGMPSMessageBuf() {}\r
+\r
+       void init(string data)\r
+       {\r
+               buf = data;\r
+               pos = 0;\r
+       }\r
+\r
+       void    clr()                   { buf = ""; }\r
+       void    add(string data)        { buf += data; }\r
+       void    set(string data)        { buf = data; }\r
+       string& str()                   { return buf; }\r
+       size_t  ofs()                   { return pos; }\r
+       void    ofs(size_t val)         { pos = val; }\r
+\r
+       unsigned char   get(bool raw = false);\r
+       unsigned char   peek(size_t ofs = 0) { return buf[pos+ofs]; }\r
+       void            put(unsigned char byte, bool raw = false);\r
+\r
+       void write1(void* data);\r
+       void write2(void* data);\r
+       void write4(void* data);\r
+       void write8(void* data);\r
+       void writef(float data);\r
+       void writed(double data);\r
+       void writes(string data);\r
+\r
+       void*   read1();\r
+       void*   read2();\r
+       void*   read4();\r
+       void*   read8();\r
+       float   readf();\r
+       double  readd();\r
+       string  reads(size_t length);\r
+\r
+       string& buffer() { return buf; }\r
+};\r
+\r
+#endif\r
diff --git a/src/Server/msg_0001_hello.cxx b/src/Server/msg_0001_hello.cxx
new file mode 100644 (file)
index 0000000..a0fad4e
--- /dev/null
@@ -0,0 +1,37 @@
+// message.hxx -- Multiplayer Client/Server message base class\r
+//\r
+// Written by John Barrett, started November 2003.\r
+//\r
+// Copyright (C) 2003  John R. Barrett - jbarrett@accesshosting.com\r
+//\r
+// This program is free software; you can redistribute it and/or\r
+// modify it under the terms of the GNU General Public License as\r
+// published by the Free Software Foundation; either version 2 of the\r
+// License, or (at your option) any later version.\r
+//\r
+// This program is distributed in the hope that it will be useful, but\r
+// WITHOUT ANY WARRANTY; without even the implied warranty of\r
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+// General Public License for more details.\r
+//\r
+// You should have received a copy of the GNU General Public License\r
+// along with this program; if not, write to the Free Software\r
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
+//\r
+\r
+\r
+#include "msg_0001_hello.hxx"\r
+\r
+FGMPSMsg0001Hello::FGMPSMsg0001Hello() \r
+{\r
+       msgid = 0x0001;\r
+       elements[0].type = fgmps_uint;          elements[0].data = &this->vermajor;     \r
+       elements[1].type = fgmps_uint;          elements[0].data = &this->verminor;     \r
+       elements[2].type = fgmps_uint;          elements[0].data = &this->verpatch;     \r
+       elements[3].type = fgmps_string;        elements[0].data = &this->servname;     \r
+       elements[4].type = fgmps_null;          elements[4].data = NULL;        \r
+}\r
+\r
+\r
+\r
+\r
diff --git a/src/Server/msg_0001_hello.hxx b/src/Server/msg_0001_hello.hxx
new file mode 100644 (file)
index 0000000..9da5bd3
--- /dev/null
@@ -0,0 +1,48 @@
+// message.hxx -- Multiplayer Client/Server message base class\r
+//\r
+// Written by John Barrett, started November 2003.\r
+//\r
+// Copyright (C) 2003  John R. Barrett - jbarrett@accesshosting.com\r
+//\r
+// This program is free software; you can redistribute it and/or\r
+// modify it under the terms of the GNU General Public License as\r
+// published by the Free Software Foundation; either version 2 of the\r
+// License, or (at your option) any later version.\r
+//\r
+// This program is distributed in the hope that it will be useful, but\r
+// WITHOUT ANY WARRANTY; without even the implied warranty of\r
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+// General Public License for more details.\r
+//\r
+// You should have received a copy of the GNU General Public License\r
+// along with this program; if not, write to the Free Software\r
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
+//\r
+\r
+\r
+#ifndef _FG_MPS_MSG0001_HXX\r
+#define _FG_MPS_MSG0001_HXX\r
+\r
+#include "message.hxx"\r
+\r
+class FGMPSMsg0001Hello\r
+{\r
+private:\r
+       FGMPSMsgElementEntry            elements[5];\r
+       unsigned int                    msgid;\r
+public:\r
+       FGMPSMsg0001Hello();\r
+       ~FGMPSMsg0001Hello() {}\r
+\r
+       virtual string                  encodemsg() {}\r
+       virtual FGMPSMessage*           decodemsg(string msg) {}\r
+       virtual FGMPSMsgElementEntry*   getelements() { return elements; }\r
+       virtual unsigned int            getmessageid() { return msgid; }\r
+\r
+       unsigned int    vermajor;\r
+       unsigned int    verminor;\r
+       unsigned int    verpatch;\r
+       string          servname;\r
+};\r
+\r
+#endif\r
diff --git a/src/Server/msgtest.cxx b/src/Server/msgtest.cxx
new file mode 100644 (file)
index 0000000..96248a6
--- /dev/null
@@ -0,0 +1,6 @@
+#include "messagebuf.hxx"\r
+\r
+main(int argc, char **argv)\r
+{\r
+       printf("Hello\n");\r
+}\r