X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fnet%2Fcommunicator.h;h=b98f488ff3f63ef64016c6a22d23e4aaf188a93c;hb=9d41b029e940bacf17a3c8d7cc06162f0a41b70a;hp=575ec84e6c3a0f2be7ea77039041a52b919c069d;hpb=5afa6e0e07b20ef58d262d69d96971df9a4be71f;p=libs%2Fnet.git diff --git a/source/net/communicator.h b/source/net/communicator.h index 575ec84..b98f488 100644 --- a/source/net/communicator.h +++ b/source/net/communicator.h @@ -2,6 +2,7 @@ #define MSP_NET_COMMUNICATOR_H_ #include +#include #include #include "protocol.h" @@ -23,7 +24,7 @@ public: }; -class Communicator +class Communicator: public NonCopyable { public: sigc::signal signal_handshake_done; @@ -33,13 +34,13 @@ private: StreamSocket &socket; const Protocol &protocol; ReceiverBase &receiver; - int handshake_status; - std::size_t buf_size; - char *in_buf; - char *in_begin; - char *in_end; - char *out_buf; - bool good; + int handshake_status = 0; + std::size_t buf_size = 65536; + char *in_buf = nullptr; + char *in_begin = nullptr; + char *in_end = nullptr; + char *out_buf = nullptr; + bool good = true; public: Communicator(StreamSocket &, const Protocol &, ReceiverBase &);