]> git.tdb.fi Git - libs/net.git/blobdiff - source/net/communicator.cpp
Move the definition of PacketTypeDef<T>::class_id to a separate header
[libs/net.git] / source / net / communicator.cpp
index 07c3be4f6b1d7c25623a957217a98f5bccea21a6..22a79631d9a214741fdbf71721d8e6322986ea4e 100644 (file)
@@ -1,5 +1,6 @@
 #include <cstring>
 #include "communicator.h"
+#include "protocol_impl.h"
 #include "streamsocket.h"
 
 using namespace std;
@@ -58,7 +59,7 @@ Communicator::Communicator(StreamSocket &s, const Protocol &p, ReceiverBase &r):
        protocol(p),
        receiver(r),
        handshake_status(0),
-       buf_size(1024),
+       buf_size(65536),
        in_buf(new char[buf_size]),
        in_begin(in_buf),
        in_end(in_buf),
@@ -116,9 +117,7 @@ void Communicator::data_available()
                while(more)
                {
                        if(handshake_status==2)
-                       {
                                more = receive_packet(protocol, receiver);
-                       }
                        else
                        {
                                HandshakeProtocol hsproto;