17 #include <gflags/gflags.h> 32 using namespace folly;
35 using thrift::test::Bonk;
36 using thrift::test::Xtruct;
46 printf(
"Bonk: %s, %i\n", request.message.c_str(), request.type);
53 .thenValue([request](
auto&&) {
55 response.string_thing =
"Stop saying " + request.message +
"!";
56 response.i32_thing = request.type;
65 std::shared_ptr<AsyncTransportWrapper> sock)
override {
85 std::make_shared<CPUThreadPoolExecutor>(10),
86 std::make_shared<RpcService>()};
94 server.
bind(FLAGS_port);
void bind(folly::AsyncServerSocket::UniquePtr s)
Future< Unit > sleep(Duration dur, Timekeeper *tk)
Future< Xtruct > operator()(Bonk request) override
—— Concurrent Priority Queue Implementation ——
ServerBootstrap * childPipeline(std::shared_ptr< PipelineFactory< Pipeline >> factory)
void init(int *argc, char ***argv, bool removeFlags)
int main(int argc, char **argv)
DEFINE_int32(port, 8080,"test server port")
std::shared_ptr< Pipeline > Ptr
SerializePipeline::Ptr newPipeline(std::shared_ptr< AsyncTransportWrapper > sock) override