aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc++/server.h
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-02-23 08:50:19 -0800
committerGravatar Craig Tiller <ctiller@google.com>2015-02-23 09:58:23 -0800
commit42bc87c0979f7a9f3084366fd466d382cf86ec17 (patch)
tree3e233e2126465227bbaa09fa3a6166f43585c944 /include/grpc++/server.h
parent759026cbf0419dae4edddd9e75fa338e1028a3d8 (diff)
Update C++ server with new core API
And reflects the C++ API in ServerBuilder.
Diffstat (limited to 'include/grpc++/server.h')
-rw-r--r--include/grpc++/server.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/include/grpc++/server.h b/include/grpc++/server.h
index 26d18d1bbe..eeee6502ab 100644
--- a/include/grpc++/server.h
+++ b/include/grpc++/server.h
@@ -76,15 +76,14 @@ class Server final : private CallHook,
class AsyncRequest;
// ServerBuilder use only
- Server(ThreadPoolInterface* thread_pool, bool thread_pool_owned,
- ServerCredentials* creds);
- Server();
+ Server(ThreadPoolInterface* thread_pool, bool thread_pool_owned);
+ Server() = delete;
// Register a service. This call does not take ownership of the service.
// The service must exist for the lifetime of the Server instance.
bool RegisterService(RpcService* service);
bool RegisterAsyncService(AsynchronousService* service);
// Add a listening port. Can be called multiple times.
- int AddPort(const grpc::string& addr);
+ int AddPort(const grpc::string& addr, ServerCredentials* creds);
// Start the server.
bool Start();
@@ -114,13 +113,11 @@ class Server final : private CallHook,
std::list<SyncRequest> sync_methods_;
// Pointer to the c grpc server.
- grpc_server* server_;
+ grpc_server* const server_;
ThreadPoolInterface* thread_pool_;
// Whether the thread pool is created and owned by the server.
bool thread_pool_owned_;
- // Whether the server is created with credentials.
- bool secure_;
};
} // namespace grpc