From 027fe7f7d4c304045bff3918e84387f59704200f Mon Sep 17 00:00:00 2001 From: Marc Burns Date: Thu, 10 Nov 2011 21:47:47 -0500 Subject: [PATCH] Nonblocking server, makefile typo fix. --- database/Makefile | 2 +- database/gen-cpp/Pos_server.skeleton.cpp | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/database/Makefile b/database/Makefile index dd24e1a..66676fe 100644 --- a/database/Makefile +++ b/database/Makefile @@ -6,7 +6,7 @@ CXXFLAGS = -g -O0 -Wall -I/users/m4burns/thrift/include/thrift -I. -Igen-cpp else CXXFLAGS = -O3 -fexpensive-optimizations -ffast-math -fno-math-errno -Wall -I/users/m4burns/thrift/include/thrift -I. -Igen-cpp endif -LDFLAGS = /users/m4burns/thrift/lib//libthrift.a +LDFLAGS = /users/m4burns/thrift/lib/libthriftnb.a /users/m4burns/thrift/lib/libthrift.a -levent SOURCES = ConfigFile.cpp db.cpp db_if.cpp linus_sha1.c log.cpp nameserver.cpp sha1.cpp gen-cpp/pos_constants.cpp gen-cpp/Pos.cpp gen-cpp/pos_types.cpp diff --git a/database/gen-cpp/Pos_server.skeleton.cpp b/database/gen-cpp/Pos_server.skeleton.cpp index 17ea6e7..c6348ae 100644 --- a/database/gen-cpp/Pos_server.skeleton.cpp +++ b/database/gen-cpp/Pos_server.skeleton.cpp @@ -3,7 +3,7 @@ #include "Pos.h" #include -#include +#include #include #include #include @@ -161,11 +161,8 @@ int main(int argc, char **argv) { shared_ptr handler(new PosHandler()); shared_ptr processor(new PosProcessor(handler)); - shared_ptr serverTransport(new TServerSocket(port)); - shared_ptr transportFactory(new TBufferedTransportFactory()); - shared_ptr protocolFactory(new TBinaryProtocolFactory()); - TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory); + TNonblockingServer server(processor, port); server.serve(); return 0; }