]> git.mxchange.org Git - simgear.git/blobdiff - simgear/io/sg_netChat.hxx
SGPath: fix creating paths with permission checker.
[simgear.git] / simgear / io / sg_netChat.hxx
index 8c3467284b403d3cdee558713b83a8e8da421e9e..3a5c08a6fd2db02f144de56cb82bf04187e891b4 100644 (file)
@@ -16,7 +16,7 @@
  
      You should have received a copy of the GNU Library General Public
      License along with this library; if not, write to the Free Software
-     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA
  
      For further information visit http://plib.sourceforge.net
 
@@ -61,7 +61,6 @@
 #ifndef SG_NET_CHAT_H
 #define SG_NET_CHAT_H
 
-#include <memory>
 #include <simgear/io/sg_netBuffer.hxx>
 
 namespace simgear
@@ -69,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