text: // This autogenerated skeleton file illustrates how to build a server.
  // You should copy it to another filename to avoid overwriting it.
  
  #include "printDate.h"
  #include <thrift/protocol/TBinaryProtocol.h>
  #include <thrift/server/TSimpleServer.h>
  #include <thrift/transport/TServerSocket.h>
  #include <thrift/transport/TBufferTransports.h>
  #include <time.h>
  
  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  ::hello_world;
  
  class printDateHandler : virtual public printDateIf {
   public:
    printDateHandler() {
      // Your initialization goes here
    }
  
    void getTime(std::string& _return) {
      // Your implementation goes here
      time_t current_time = time(NULL);
      _return = ctime(&current_time);
    }
  
  };
  
  int main(int argc, char **argv) {
    int port = 9090;
    shared_ptr<printDateHandler> handler(new printDateHandler());
    shared_ptr<TProcessor> processor(new printDateProcessor(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;
  }
  
  