ws snake (cobra simple server) add basic support for unsubscription + subscribe send the proper subscription data + redis client subscription can be cancelled

This commit is contained in:
Benjamin Sergeant
2019-09-05 20:27:01 -07:00
parent 2defe6f597
commit 24b2475b11
8 changed files with 76 additions and 12 deletions

View File

@ -4,10 +4,10 @@
* Copyright (c) 2019 Machine Zone, Inc. All rights reserved.
*/
#include <IXSnakeServer.h>
#include <IXSnakeProtocol.h>
#include <IXSnakeConnectionState.h>
#include <IXAppConfig.h>
#include "IXSnakeServer.h"
#include "IXSnakeProtocol.h"
#include "IXSnakeConnectionState.h"
#include "IXAppConfig.h"
#include <iostream>
#include <sstream>
@ -118,8 +118,19 @@ namespace snake
}
_server.start();
_server.wait();
return true;
}
void SnakeServer::runForever()
{
if (run())
{
_server.wait();
}
}
void SnakeServer::stop()
{
_server.stop();
}
}