summaryrefslogtreecommitdiffstats
path: root/Source/cmPipeConnection.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-07-18 15:13:46 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-07-18 15:14:02 (GMT)
commitfc4f3525133270ccc33ccda6acff6f85006ab457 (patch)
tree31473b60683d51e6c0b747c502bc6f2098f66c56 /Source/cmPipeConnection.h
parent407c7415f41fc27578bb0ab2c831e767de575531 (diff)
parentcf0ae55dcb9224b92a95166f17452c56ba5b6213 (diff)
downloadCMake-fc4f3525133270ccc33ccda6acff6f85006ab457.zip
CMake-fc4f3525133270ccc33ccda6acff6f85006ab457.tar.gz
CMake-fc4f3525133270ccc33ccda6acff6f85006ab457.tar.bz2
Merge topic 'server-refactor'
cf0ae55d server: Add support for connections that aren't event based 5ddfb6a4 server: Add connection as part of a request d4f5d35c server: Refactor to make the event loop owned by server object 5acbf08b Tests: Teach Server test to forward exit code from server process Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !552
Diffstat (limited to 'Source/cmPipeConnection.h')
-rw-r--r--Source/cmPipeConnection.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/Source/cmPipeConnection.h b/Source/cmPipeConnection.h
new file mode 100644
index 0000000..fea85b5
--- /dev/null
+++ b/Source/cmPipeConnection.h
@@ -0,0 +1,28 @@
+/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+ file Copyright.txt or https://cmake.org/licensing for details. */
+
+#pragma once
+
+#include "cmConnection.h"
+
+#include "cm_uv.h"
+
+#include <string>
+
+class cmPipeConnection : public cmEventBasedConnection
+{
+public:
+ cmPipeConnection(const std::string& name,
+ cmConnectionBufferStrategy* bufferStrategy = nullptr);
+
+ bool OnServeStart(std::string* pString) override;
+
+ bool OnConnectionShuttingDown() override;
+
+ void Connect(uv_stream_t* server) override;
+
+private:
+ const std::string PipeName;
+ uv_pipe_t* ServerPipe = nullptr;
+ uv_pipe_t* ClientPipe = nullptr;
+};