using namespace ::apache::thrift;
using namespace ::apache::thrift::protocol;
using namespace ::apache::thrift::transport;
using namespace ::apache::thrift::server;

using boost::shared_ptr;

using namespace  ::entry;

class EntryThriftSvrHandler : virtual public EntryThriftSvrIf {
 public:
  EntryThriftSvrHandler() {
    // Your initialization goes here
  }

  void Send(ThriftPkg& _return, const ThriftPkg& req) {
    // Your implementation goes here
    printf("Send\n");
  }

};

int main(int argc, char **argv) {
  int port = 9090;
  shared_ptr<EntryThriftSvrHandler> handler(new EntryThriftSvrHandler());
  shared_ptr<TProcessor> processor(new EntryThriftSvrProcessor(handler));
  shared_ptr<TServerTransport> serverTransport(new TServerSocket(port));
  shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory());
  shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());

  TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory);
  server.serve();
  return 0;
}

