aboutsummaryrefslogtreecommitdiffstats
path: root/test/RPCSession.h
diff options
context:
space:
mode:
authorDmitry K <winsvega@mail.ru>2016-08-02 16:11:04 +0800
committerDmitry K <winsvega@mail.ru>2016-08-02 16:11:04 +0800
commitd1c744450965644df17fcc73006dd7495e75c477 (patch)
tree8a175cef7d1e4661a6639d6ae09714711c113ef4 /test/RPCSession.h
parent17957d3a93a0d7cf6d4a0081d72ee7e35c898c56 (diff)
downloaddexon-solidity-d1c744450965644df17fcc73006dd7495e75c477.tar
dexon-solidity-d1c744450965644df17fcc73006dd7495e75c477.tar.gz
dexon-solidity-d1c744450965644df17fcc73006dd7495e75c477.tar.bz2
dexon-solidity-d1c744450965644df17fcc73006dd7495e75c477.tar.lz
dexon-solidity-d1c744450965644df17fcc73006dd7495e75c477.tar.xz
dexon-solidity-d1c744450965644df17fcc73006dd7495e75c477.tar.zst
dexon-solidity-d1c744450965644df17fcc73006dd7495e75c477.zip
windowspipe
Diffstat (limited to 'test/RPCSession.h')
-rw-r--r--test/RPCSession.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/RPCSession.h b/test/RPCSession.h
index 1a1fbbe5..fd77ceca 100644
--- a/test/RPCSession.h
+++ b/test/RPCSession.h
@@ -22,12 +22,32 @@
#include <string>
#include <stdio.h>
#include <map>
+#if defined(_WIN32)
+#else
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
+#endif
#include <json/value.h>
#include <boost/test/unit_test.hpp>
+#if defined(_WIN32)
+class IPCSocket : public boost::noncopyable
+{
+public:
+ IPCSocket(std::string const& _path);
+ std::string sendRequest(std::string const& _req);
+ ~IPCSocket() { fclose(m_fp); }
+
+ std::string const& path() const { return m_path; }
+
+private:
+ FILE *m_fp;
+ std::string m_path;
+ int m_socket;
+
+};
+#else
class IPCSocket: public boost::noncopyable
{
public:
@@ -43,6 +63,7 @@ private:
int m_socket;
};
+#endif
class RPCSession: public boost::noncopyable
{