Commit 7541b6f9 by amir

change mongoose to civetweb in serverfactory

parent c72447f4
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
#include <chrono> #include <chrono>
#include <utility> #include <utility>
#include <string.h>
#include <unistd.h>
/** /**
* common utils * common utils
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include <impl/servers/Microservice_IRestServerRMQImpl.h> #include <impl/servers/Microservice_IRestServerRMQImpl.h>
cMicroservice_IRestServerCivetWebImpl * cMicroservice_IRestServerCivetWebImpl *
ServerFactory::createIRestServerMongooseImpl(std::string host, int port, int workerThreadsNum) { ServerFactory::createIRestServerCivetWebImpl(std::string host, int port, int workerThreadsNum) {
return new cMicroservice_IRestServerCivetWebImpl(new cMicroservice_RestServerParams(port,host,workerThreadsNum)); return new cMicroservice_IRestServerCivetWebImpl(new cMicroservice_RestServerParams(port,host,workerThreadsNum));
} }
......
...@@ -18,7 +18,7 @@ class cMicroservice_IRestServerRMQImpl; ...@@ -18,7 +18,7 @@ class cMicroservice_IRestServerRMQImpl;
class ServerFactory { class ServerFactory {
public: public:
static cMicroservice_IRestServerCivetWebImpl* createIRestServerMongooseImpl(std::string host, static cMicroservice_IRestServerCivetWebImpl* createIRestServerCivetWebImpl(std::string host,
int port, int port,
int workerThreadsNum); int workerThreadsNum);
static Microservice_IMsgQueueServerZmqImpl* createIMsgQueueServerZmqImpl(std::string host, static Microservice_IMsgQueueServerZmqImpl* createIMsgQueueServerZmqImpl(std::string host,
......
...@@ -302,7 +302,7 @@ void runNewMS(){ ...@@ -302,7 +302,7 @@ void runNewMS(){
.addClient(ClientFactory::createHttpImplMsClient("other-service", "localhost", 32010, true, 10, false,"localhost:6379")) //new cMicroservice_Client(new MSICommandClientHttpImpl(),&clientParams)) .addClient(ClientFactory::createHttpImplMsClient("other-service", "localhost", 32010, true, 10, false,"localhost:6379")) //new cMicroservice_Client(new MSICommandClientHttpImpl(),&clientParams))
.addClient(ClientFactory::createZmqMsgQImp("zmq-service", msApp.name(), 0, .addClient(ClientFactory::createZmqMsgQImp("zmq-service", msApp.name(), 0,
Microservice_ZMQServerParams::eProtocol::eIpc)) Microservice_ZMQServerParams::eProtocol::eIpc))
.addServer(ServerFactory::createIRestServerMongooseImpl("", 50010, 1))// .addRestServer(new cMicroservice_IRestServerCivetWebImpl(new cMicroservice_RestServerParams(50010,"",1))) .addServer(ServerFactory::createIRestServerCivetWebImpl("", 50010, 1))// .addRestServer(new cMicroservice_IRestServerCivetWebImpl(new cMicroservice_RestServerParams(50010,"",1)))
.addServer(ServerFactory::createIMsgQueueServerZmqImpl(msApp.name(), 0, Microservice_ZMQServerParams::eProtocol::eIpc)) .addServer(ServerFactory::createIMsgQueueServerZmqImpl(msApp.name(), 0, Microservice_ZMQServerParams::eProtocol::eIpc))
.addHandler("/xxx",(cMicroservice_BaseHandler*)new cMicroserviceHandler("hello")) .addHandler("/xxx",(cMicroservice_BaseHandler*)new cMicroserviceHandler("hello"))
.addHandler("/zmq",new MSMsgQHandler()) .addHandler("/zmq",new MSMsgQHandler())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment