X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fnet%2Fcommunicator.cpp;h=22a79631d9a214741fdbf71721d8e6322986ea4e;hb=d20870655aeca0614d9fc315fe5f9893ebdc7aa3;hp=07c3be4f6b1d7c25623a957217a98f5bccea21a6;hpb=df1b7561be0d4a57e964c783c01060c54864ec60;p=libs%2Fnet.git diff --git a/source/net/communicator.cpp b/source/net/communicator.cpp index 07c3be4..22a7963 100644 --- a/source/net/communicator.cpp +++ b/source/net/communicator.cpp @@ -1,5 +1,6 @@ #include #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;