Add simple Redis Server which is only capable of doing publish / subscribe. New ws redis_server sub-command to use it. The server is used in the unittest, so that we can run on CI in environment where redis isn not available like github actions env.
This commit is contained in:
1 parent
8f8385f8f8
commit
fbf80f4ab1
20 files changed
+497
-27
No files matched your search
@@ -119,6 +119,8 @@ namespace ix
|
||||
|
||||
void SocketServer::start()
|
||||
{
|
||||
_stop = false;
|
||||
|
||||
if (!_thread.joinable())
|
||||
{
|
||||
_thread = std::thread(&SocketServer::run, this);
|
||||
|
||||
@@ -58,6 +58,8 @@ namespace ix
|
||||
|
||||
void stopAcceptingConnections();
|
||||
|
||||
std::atomic<bool> _stop;
|
||||
|
||||
private:
|
||||
// Member variables
|
||||
int _port;
|
||||
@@ -71,7 +73,6 @@ namespace ix
|
||||
std::mutex _logMutex;
|
||||
|
||||
// background thread to wait for incoming connections
|
||||
std::atomic<bool> _stop;
|
||||
std::thread _thread;
|
||||
void run();
|
||||
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define IX_WEBSOCKET_VERSION "6.2.3"
|
||||
#define IX_WEBSOCKET_VERSION "6.2.5"
|
||||
Reference in new issue
Block a user