Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F3996258
main.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Jul 8, 9:46 AM
Size
1 KB
Mime Type
text/x-c++
Expires
Fri, Jul 10, 9:46 AM (1 d, 11 h)
Engine
blob
Format
Raw Data
Handle
272015
Attached To
rXR Xreate
main.cpp
View Options
/*
* File: main.cpp
* Author: pgess
*
* Created on March 28, 2016, 3:59 PM
*/
#include "XreateServer.h"
#include <thrift/concurrency/ThreadManager.h>
#include <thrift/concurrency/PlatformThreadFactory.h>
#include <thrift/protocol/TJSONProtocol.h>
#include <thrift/server/TThreadPoolServer.h>
#include <thrift/server/TThreadedServer.h>
#include <thrift/transport/TServerSocket.h>
#include <thrift/transport/TSocket.h>
#include <thrift/transport/THttpServer.h>
#include <thrift/transport/TTransportUtils.h>
#include <thrift/TToString.h>
#include <boost/make_shared.hpp>
#include <iostream>
#include <stdexcept>
#include <sstream>
using namespace std;
using namespace apache::thrift;
using namespace apache::thrift::concurrency;
using namespace apache::thrift::protocol;
using namespace apache::thrift::transport;
using namespace apache::thrift::server;
int main() {
TThreadedServer server(
//Processor:
boost::make_shared<AbstractXreateServerProcessorFactory>(boost::make_shared<XreateServerFactory>()),
//serverSocket:
boost::shared_ptr<TServerSocket>(new TServerSocket(9090)),
//transportFactory
boost::shared_ptr<TTransportFactory>(new THttpServerTransportFactory()),
//protocolFactory
boost::shared_ptr<TProtocolFactory>(new TJSONProtocolFactory())
);
/*
* new TThreadPoolServer(,
serverSocket,
transportFactory,
,
threadManager)
*/
cout << "Starting the server..." << endl;
server.serve();
cout << "Done." << endl;
return 0;
}
Event Timeline
Log In to Comment