From b508aac64a1c189367a34e79906a7b2553d0ad15 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 7 Feb 2017 13:34:00 +0000 Subject: Use only send/recv in IPC --- test/RPCSession.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test/RPCSession.h') diff --git a/test/RPCSession.h b/test/RPCSession.h index fc166b99..5369e1e2 100644 --- a/test/RPCSession.h +++ b/test/RPCSession.h @@ -55,12 +55,11 @@ class IPCSocket: public boost::noncopyable public: IPCSocket(std::string const& _path); std::string sendRequest(std::string const& _req); - ~IPCSocket() { close(m_socket); fclose(m_fp); } + ~IPCSocket() { close(m_socket); } std::string const& path() const { return m_path; } private: - FILE *m_fp; std::string m_path; int m_socket; }; -- cgit From 5396c7692b87587dc35c07b2c6239782efd20739 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 7 Feb 2017 14:10:43 +0000 Subject: Do not expect a new line, rather buffer up the response in IPC --- test/RPCSession.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/RPCSession.h') diff --git a/test/RPCSession.h b/test/RPCSession.h index 5369e1e2..f1aee6a8 100644 --- a/test/RPCSession.h +++ b/test/RPCSession.h @@ -35,7 +35,6 @@ #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: @@ -47,7 +46,8 @@ public: private: std::string m_path; - HANDLE m_socket; + HANDLE m_socket; + TCHAR m_readBuf[512000]; }; #else class IPCSocket: public boost::noncopyable @@ -62,6 +62,7 @@ public: private: std::string m_path; int m_socket; + char m_readBuf[512000]; }; #endif -- cgit