aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc++
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2016-02-22 23:15:28 -0800
committerGravatar David Garcia Quintas <dgq@google.com>2016-02-22 23:15:28 -0800
commit45add8a445d426959634e172f195c57c56c4ca3d (patch)
treeeef39567b46b94ae21723961c8ff1980db88dbaf /include/grpc++
parent0160873273be3fb502f05d4349e074422f4addcb (diff)
parent27b3f776da80da9d74e9c6a43d6794c86ba0cfb3 (diff)
Merge branch 'master' of github.com:grpc/grpc into alarm_cpp
Diffstat (limited to 'include/grpc++')
-rw-r--r--include/grpc++/alarm.h7
-rw-r--r--include/grpc++/server.h6
2 files changed, 8 insertions, 5 deletions
diff --git a/include/grpc++/alarm.h b/include/grpc++/alarm.h
index 59988b8732..3b8104d135 100644
--- a/include/grpc++/alarm.h
+++ b/include/grpc++/alarm.h
@@ -36,10 +36,11 @@
#ifndef GRPCXX_ALARM_H
#define GRPCXX_ALARM_H
+#include <grpc++/impl/codegen/completion_queue.h>
#include <grpc++/impl/codegen/completion_queue_tag.h>
#include <grpc++/impl/codegen/grpc_library.h>
#include <grpc++/impl/codegen/time.h>
-#include <grpc++/impl/codegen/completion_queue.h>
+#include <grpc++/impl/grpc_library.h>
#include <grpc/grpc.h>
struct grpc_alarm;
@@ -67,11 +68,11 @@ class Alarm : private GrpcLibrary {
static_cast<void*>(&tag_))) {}
/// Destroy the given completion queue alarm, cancelling it in the process.
- ~Alarm();
+ ~Alarm() { grpc_alarm_destroy(alarm_); }
/// Cancel a completion queue alarm. Calling this function over an alarm that
/// has already fired has no effect.
- void Cancel();
+ void Cancel() { grpc_alarm_cancel(alarm_); }
private:
class AlarmEntry : public CompletionQueueTag {
diff --git a/include/grpc++/server.h b/include/grpc++/server.h
index 2a71073a7e..c177805236 100644
--- a/include/grpc++/server.h
+++ b/include/grpc++/server.h
@@ -79,6 +79,8 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibrary {
class GlobalCallbacks {
public:
virtual ~GlobalCallbacks() {}
+ /// Called before server is created.
+ virtual void UpdateArguments(ChannelArguments* args) {}
/// Called before application callback for each synchronous server request
virtual void PreSynchronousRequest(ServerContext* context) = 0;
/// Called after application callback for each synchronous server request
@@ -108,7 +110,7 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibrary {
/// \param max_message_size Maximum message length that the channel can
/// receive.
Server(ThreadPoolInterface* thread_pool, bool thread_pool_owned,
- int max_message_size, const ChannelArguments& args);
+ int max_message_size, ChannelArguments* args);
/// Register a service. This call does not take ownership of the service.
/// The service must exist for the lifetime of the Server instance.
@@ -177,7 +179,7 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibrary {
bool has_generic_service_;
// Pointer to the c grpc server.
- grpc_server* const server_;
+ grpc_server* server_;
ThreadPoolInterface* thread_pool_;
// Whether the thread pool is created and owned by the server.