34 #ifndef GRPCXX_SERVER_H
35 #define GRPCXX_SERVER_H
40 #include <grpc++/completion_queue.h>
41 #include <grpc++/config.h>
42 #include <grpc++/impl/call.h>
43 #include <grpc++/impl/grpc_library.h>
44 #include <grpc++/impl/service_type.h>
45 #include <grpc++/impl/sync.h>
46 #include <grpc++/status.h>
51 class AsynchronousService;
52 class GenericServerContext;
53 class AsyncGenericService;
55 class RpcServiceMethod;
57 class ThreadPoolInterface;
62 private AsynchronousService::DispatchImpl {
75 friend class AsyncGenericService;
76 friend class ServerBuilder;
82 Server(ThreadPoolInterface* thread_pool,
bool thread_pool_owned,
83 int max_message_size);
86 bool RegisterService(RpcService* service);
87 bool RegisterAsyncService(AsynchronousService* service);
88 void RegisterAsyncGenericService(AsyncGenericService* service);
94 void HandleQueueClosed();
96 void ScheduleCallback();
98 void PerformOpsOnCall(CallOpBuffer* ops,
Call* call) GRPC_OVERRIDE;
102 grpc::protobuf::Message*
request,
103 ServerAsyncStreamingInterface*
stream,
105 ServerCompletionQueue* notification_cq,
106 void* tag) GRPC_OVERRIDE;
108 void RequestAsyncGenericCall(GenericServerContext* context,
109 ServerAsyncStreamingInterface*
stream,
111 ServerCompletionQueue* notification_cq,
114 const int max_message_size_;
127 std::list<SyncRequest>* sync_methods_;
132 ThreadPoolInterface* thread_pool_;
134 bool thread_pool_owned_;
136 Server() : max_message_size_(-1), server_(NULL) { abort(); }
141 #endif // GRPCXX_SERVER_H
Definition: sync_no_cxx11.h:45
Definition: _completion_queue.h:40
Definition: sync_no_cxx11.h:84
Definition: proto_utils.cc:45
Definition: chttp2_transport.c:307
Definition: _server_credentials.h:40
Definition: channel_create.c:62