]> git.mxchange.org Git - simgear.git/blobdiff - simgear/io/sg_netChat.hxx
Reset: allow re-init of Nasal Ghosts.
[simgear.git] / simgear / io / sg_netChat.hxx
index 41097c0ab284ada88a00055f36f14dedc82b3097..3a5c08a6fd2db02f144de56cb82bf04187e891b4 100644 (file)
@@ -61,8 +61,6 @@
 #ifndef SG_NET_CHAT_H
 #define SG_NET_CHAT_H
 
-#include <memory>
-#include <cstdlib>
 #include <simgear/io/sg_netBuffer.hxx>
 
 namespace simgear
@@ -70,19 +68,20 @@ namespace simgear
 
 class NetChat : public NetBufferChannel
 {
-  char* terminator;
+  std::string terminator;
   int bytesToCollect;
+
+protected:
   virtual void handleBufferRead (NetBuffer& buffer) ;
 
 public:
 
-  NetChat () : 
-    terminator (NULL),
+  NetChat () :
     bytesToCollect(-1) 
   {}
 
-  void setTerminator (const char* t);
-  const char* getTerminator (void);
+  void setTerminator(const std::string& t);
+  const char* getTerminator() const;
 
   /**
    * set byte count to collect - 'foundTerminator' will be called once