2017-03-24 21:38:52 -06:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
|
|
|
#pragma once
|
|
|
|
|
2017-08-25 20:39:02 +02:00
|
|
|
#include "cmConfigure.h" // IWYU pragma: keep
|
2017-03-24 21:38:52 -06:00
|
|
|
|
2017-07-23 12:31:13 -06:00
|
|
|
#include "cmUVHandlePtr.h"
|
2017-03-24 21:38:52 -06:00
|
|
|
#include <string>
|
|
|
|
|
2017-08-25 20:39:02 +02:00
|
|
|
#include "cmConnection.h"
|
|
|
|
#include "cm_uv.h"
|
|
|
|
|
2017-02-25 15:06:34 -07:00
|
|
|
class cmPipeConnection : public cmEventBasedConnection
|
2017-03-24 21:38:52 -06:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
cmPipeConnection(const std::string& name,
|
|
|
|
cmConnectionBufferStrategy* bufferStrategy = nullptr);
|
|
|
|
|
|
|
|
bool OnServeStart(std::string* pString) override;
|
|
|
|
|
2017-02-25 15:06:34 -07:00
|
|
|
bool OnConnectionShuttingDown() override;
|
2017-03-24 21:38:52 -06:00
|
|
|
|
|
|
|
void Connect(uv_stream_t* server) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
const std::string PipeName;
|
2017-07-23 12:31:13 -06:00
|
|
|
cm::uv_pipe_ptr ServerPipe;
|
2017-03-24 21:38:52 -06:00
|
|
|
};
|