Try reading multiple times from IPC.

This commit is contained in:
chriseth
2017-02-25 00:11:26 +01:00
parent d2c79bf8e9
commit 4305ecb0e7
2 changed files with 33 additions and 16 deletions
+8 -2
View File
@@ -28,11 +28,13 @@
#include <sys/un.h>
#endif
#include <json/value.h>
#include <boost/test/unit_test.hpp>
#include <string>
#include <stdio.h>
#include <map>
#include <json/value.h>
#include <boost/test/unit_test.hpp>
#if defined(_WIN32)
class IPCSocket : public boost::noncopyable
@@ -60,8 +62,12 @@ public:
std::string const& path() const { return m_path; }
private:
std::string m_path;
int m_socket;
/// Socket read timeout in milliseconds. Needs to be large because the key generation routine
/// might take long.
unsigned static constexpr m_readTimeOutMS = 15000;
char m_readBuf[512000];
};
#endif