add example websocket C++ server snake which supports basic cobra ops (publish and subscribe without stream sql
This commit is contained in:
30
ws/snake/IXSnakeServer.h
Normal file
30
ws/snake/IXSnakeServer.h
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* IXSnakeServer.h
|
||||
* Author: Benjamin Sergeant
|
||||
* Copyright (c) 2019 Machine Zone, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <ixwebsocket/IXWebSocketServer.h>
|
||||
#include "IXAppConfig.h"
|
||||
|
||||
namespace snake
|
||||
{
|
||||
class SnakeServer
|
||||
{
|
||||
public:
|
||||
SnakeServer(const AppConfig& appConfig);
|
||||
~SnakeServer() = default;
|
||||
|
||||
bool run();
|
||||
|
||||
private:
|
||||
std::string parseAppKey(const std::string& path);
|
||||
|
||||
AppConfig _appConfig;
|
||||
ix::WebSocketServer _server;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user