X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fnet%2Fcommunicator.h;h=e9f646a59a62ba1f0796a36cf57f2d27454d849d;hb=449a2f3417748761f94f3002b1c15819c4d83365;hp=322d095a8ec3d1c1df5b258c25f65b3c88a713fa;hpb=6625cf0e574406425c35d33110f8d99617e902df;p=libs%2Fnet.git diff --git a/source/net/communicator.h b/source/net/communicator.h index 322d095..e9f646a 100644 --- a/source/net/communicator.h +++ b/source/net/communicator.h @@ -2,7 +2,9 @@ #define MSP_NET_COMMUNICATOR_H_ #include +#include #include +#include "mspnet_api.h" #include "protocol.h" namespace Msp { @@ -10,20 +12,20 @@ namespace Net { class StreamSocket; -class sequence_error: public invalid_state +class MSPNET_API sequence_error: public invalid_state { public: sequence_error(const std::string &w): invalid_state(w) { } }; -class incompatible_protocol: public std::runtime_error +class MSPNET_API incompatible_protocol: public std::runtime_error { public: incompatible_protocol(const std::string &w): std::runtime_error(w) { } }; -class Communicator +class MSPNET_API Communicator: public NonCopyable { public: sigc::signal signal_handshake_done; @@ -35,10 +37,10 @@ private: ReceiverBase &receiver; int handshake_status = 0; std::size_t buf_size = 65536; - char *in_buf = 0; - char *in_begin = 0; - char *in_end = 0; - char *out_buf = 0; + char *in_buf = nullptr; + char *in_begin = nullptr; + char *in_end = nullptr; + char *out_buf = nullptr; bool good = true; public: