|
|
@ -34,7 +34,6 @@ |
|
|
|
#include <iostream> |
|
|
|
#include <iostream> |
|
|
|
#include <memory> |
|
|
|
#include <memory> |
|
|
|
#include <string> |
|
|
|
#include <string> |
|
|
|
#include <thread> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <grpc/grpc.h> |
|
|
|
#include <grpc/grpc.h> |
|
|
|
#include <grpc++/server.h> |
|
|
|
#include <grpc++/server.h> |
|
|
@ -69,9 +68,7 @@ void RunServer() { |
|
|
|
builder.RegisterService(&service); |
|
|
|
builder.RegisterService(&service); |
|
|
|
std::unique_ptr<Server> server(builder.BuildAndStart()); |
|
|
|
std::unique_ptr<Server> server(builder.BuildAndStart()); |
|
|
|
std::cout << "Server listening on " << server_address << std::endl; |
|
|
|
std::cout << "Server listening on " << server_address << std::endl; |
|
|
|
while (true) { |
|
|
|
server->Wait(); |
|
|
|
std::this_thread::sleep_for(std::chrono::seconds(5)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char** argv) { |
|
|
|
int main(int argc, char** argv) { |
|
|
|