diff options
author | Justin Berger <j.david.berger@gmail.com> | 2017-03-25 03:38:52 (GMT) |
---|---|---|
committer | Justin Berger <j.david.berger@gmail.com> | 2017-07-11 00:11:27 (GMT) |
commit | d4f5d35ca491ede92003b26a7d0eb06aea3a2bbb (patch) | |
tree | 90f665b7e1611c47ab8eaa3f069e9572d3df58fb /Source/cmPipeConnection.h | |
parent | 5acbf08bff643ec6779464c840bfe2f02a4e65ae (diff) | |
download | CMake-d4f5d35ca491ede92003b26a7d0eb06aea3a2bbb.zip CMake-d4f5d35ca491ede92003b26a7d0eb06aea3a2bbb.tar.gz CMake-d4f5d35ca491ede92003b26a7d0eb06aea3a2bbb.tar.bz2 |
server: Refactor to make the event loop owned by server object
Diffstat (limited to 'Source/cmPipeConnection.h')
-rw-r--r-- | Source/cmPipeConnection.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Source/cmPipeConnection.h b/Source/cmPipeConnection.h new file mode 100644 index 0000000..3d3d52c --- /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 cmConnection +{ +public: + cmPipeConnection(const std::string& name, + cmConnectionBufferStrategy* bufferStrategy = nullptr); + + bool OnServeStart(std::string* pString) override; + + bool OnServerShuttingDown() override; + + void Connect(uv_stream_t* server) override; + +private: + const std::string PipeName; + uv_pipe_t* ServerPipe = nullptr; + uv_pipe_t* ClientPipe = nullptr; +}; |