diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2016-09-13 09:39:24 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-09-19 12:57:57 (GMT) |
commit | d341d077c5fb5c3df3732210b836a9ba6cb53873 (patch) | |
tree | 2235f21ec1ae9ff3c810204f159fc35adb60c45b /Source/cmServer.cxx | |
parent | b13d3e0d0b3c644242ef8dc4977d35da73398a9d (diff) | |
download | CMake-d341d077c5fb5c3df3732210b836a9ba6cb53873.zip CMake-d341d077c5fb5c3df3732210b836a9ba6cb53873.tar.gz CMake-d341d077c5fb5c3df3732210b836a9ba6cb53873.tar.bz2 |
cmake-server: Implement ServerProtocol 1.0
Enable the initial handshake of the client to complete the connection
to the server.
The handshake sets the protocol version that client and server will
use to talk to each other. The only way to change this is to quit the
server and start over.
CMake specific information is also set during the initial handshake.
Since cmake so far never had to change basic information about any project
while running, it was decided to keep this information static and
require a restart of the cmake server to change any of these.
Diffstat (limited to 'Source/cmServer.cxx')
-rw-r--r-- | Source/cmServer.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmServer.cxx b/Source/cmServer.cxx index 7643b47..123b6a4 100644 --- a/Source/cmServer.cxx +++ b/Source/cmServer.cxx @@ -87,6 +87,8 @@ void read_stdin(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) cmServer::cmServer() { + // Register supported protocols: + this->RegisterProtocol(new cmServerProtocol1_0); } cmServer::~cmServer() @@ -245,6 +247,7 @@ cmServerResponse cmServer::SetProtocolVersion(const cmServerRequest& request) void cmServer::Serve() { + assert(!this->SupportedProtocols.empty()); assert(!this->Protocol); this->Loop = uv_default_loop(); |