libt2n: (gerd) add hello messages
[libt2n] / src / connection.hxx
index 633798b..2343984 100644 (file)
 
 #include <string>
 
+#include <netinet/in.h>
+
+#include "types.hxx"
+
 namespace libt2n
 {
 
@@ -33,16 +37,18 @@ class connection
 
     protected:
         connection()
-        { closed=false; }
+            { closed=false; }
 
         std::string buffer;
 
-        typedef unsigned int packet_size_indicator;
+        typedef uint32_t packet_size_indicator;
 
         packet_size_indicator bytes_available();
 
         virtual void real_write(const std::string& data)=0;
 
+        virtual std::ostream* get_logstream(log_level_values level)=0;
+
     public:
         virtual ~connection()
             { close(); }