From 5925ae0c6a32517f3b19b095e3ed8518d021f2e7 Mon Sep 17 00:00:00 2001 From: Dmitry K Date: Tue, 2 Aug 2016 19:32:03 +0300 Subject: Windows pipe for soltest --- test/RPCSession.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'test/RPCSession.h') diff --git a/test/RPCSession.h b/test/RPCSession.h index fd77ceca..9b7009bf 100644 --- a/test/RPCSession.h +++ b/test/RPCSession.h @@ -19,33 +19,35 @@ * @date 2016 */ -#include -#include -#include #if defined(_WIN32) +#include +#include "libdevcore/UndefMacros.h" #else #include #include #include #endif + +#include +#include +#include #include #include #if defined(_WIN32) +const int c_buffsize = 5120000; //because windows pipe is broken and wont work as in examples. use larger buffer limit to receive whole package in one call class IPCSocket : public boost::noncopyable { public: IPCSocket(std::string const& _path); std::string sendRequest(std::string const& _req); - ~IPCSocket() { fclose(m_fp); } + ~IPCSocket() { CloseHandle(m_socket); } std::string const& path() const { return m_path; } private: - FILE *m_fp; std::string m_path; - int m_socket; - + HANDLE m_socket; }; #else class IPCSocket: public boost::noncopyable @@ -61,7 +63,6 @@ private: FILE *m_fp; std::string m_path; int m_socket; - }; #endif -- cgit