#include <server_interface.h>
|
virtual | ~ServerInterface () |
|
template<class T > |
void | Shutdown (const T &deadline) |
| Shutdown the server, blocking until all rpc processing finishes. More...
|
|
void | Shutdown () |
| Shutdown the server, waiting for all rpc processing to finish. More...
|
|
virtual void | Wait ()=0 |
| Block waiting for all work to complete. More...
|
|
virtual | ~CallHook () |
|
|
virtual bool | RegisterService (const grpc::string *host, Service *service)=0 |
| Register a service. More...
|
|
virtual void | RegisterAsyncGenericService (AsyncGenericService *service)=0 |
| Register a generic service. More...
|
|
virtual int | AddListeningPort (const grpc::string &addr, ServerCredentials *creds)=0 |
| Tries to bind server to the given addr. More...
|
|
virtual void | Start (ServerCompletionQueue **cqs, size_t num_cqs)=0 |
| Start the server. More...
|
|
virtual void | ShutdownInternal (gpr_timespec deadline)=0 |
|
virtual int | max_receive_message_size () const =0 |
|
virtual grpc_server * | server ()=0 |
|
virtual void | PerformOpsOnCall (internal::CallOpSetInterface *ops, internal::Call *call)=0 |
|
template<class Message > |
void | RequestAsyncCall (internal::RpcServiceMethod *method, ServerContext *context, internal::ServerAsyncStreamingInterface *stream, CompletionQueue *call_cq, ServerCompletionQueue *notification_cq, void *tag, Message *message) |
|
void | RequestAsyncCall (internal::RpcServiceMethod *method, ServerContext *context, internal::ServerAsyncStreamingInterface *stream, CompletionQueue *call_cq, ServerCompletionQueue *notification_cq, void *tag) |
|
void | RequestAsyncGenericCall (GenericServerContext *context, internal::ServerAsyncStreamingInterface *stream, CompletionQueue *call_cq, ServerCompletionQueue *notification_cq, void *tag) |
|
◆ ~ServerInterface()
virtual grpc::ServerInterface::~ServerInterface |
( |
| ) |
|
|
inlinevirtual |
◆ AddListeningPort()
Tries to bind server to the given addr.
It can be invoked multiple times.
- Parameters
-
addr | The address to try to bind to the server (eg, localhost:1234, 192.168.1.1:31416, [::1]:27182, etc.). creds The credentials associated with the server. |
- Returns
- bound port number on sucess, 0 on failure.
- Warning
- It's an error to call this method on an already started server.
Implemented in grpc::Server.
◆ max_receive_message_size()
virtual int grpc::ServerInterface::max_receive_message_size |
( |
| ) |
const |
|
protectedpure virtual |
◆ PerformOpsOnCall()
◆ RegisterAsyncGenericService()
virtual void grpc::ServerInterface::RegisterAsyncGenericService |
( |
AsyncGenericService * |
service | ) |
|
|
protectedpure virtual |
Register a generic service.
This call does not take ownership of the service. The service must exist for the lifetime of the Server instance.
◆ RegisterService()
virtual bool grpc::ServerInterface::RegisterService |
( |
const grpc::string * |
host, |
|
|
Service * |
service |
|
) |
| |
|
protectedpure virtual |
Register a service.
This call does not take ownership of the service. The service must exist for the lifetime of the Server instance.
Implemented in grpc::Server.
◆ RequestAsyncCall() [1/2]
◆ RequestAsyncCall() [2/2]
◆ RequestAsyncGenericCall()
◆ server()
◆ Shutdown() [1/2]
template<class T >
void grpc::ServerInterface::Shutdown |
( |
const T & |
deadline | ) |
|
|
inline |
Shutdown the server, blocking until all rpc processing finishes.
Forcefully terminate pending calls after deadline expires.
All completion queue associated with the server (for example, for async serving) must be shutdown after this method has returned: See ServerBuilder::AddCompletionQueue for details.
- Parameters
-
deadline | How long to wait until pending rpcs are forcefully terminated. |
◆ Shutdown() [2/2]
void grpc::ServerInterface::Shutdown |
( |
| ) |
|
|
inline |
Shutdown the server, waiting for all rpc processing to finish.
All completion queue associated with the server (for example, for async serving) must be shutdown after this method has returned: See ServerBuilder::AddCompletionQueue for details.
◆ ShutdownInternal()
virtual void grpc::ServerInterface::ShutdownInternal |
( |
gpr_timespec |
deadline | ) |
|
|
protectedpure virtual |
◆ Start()
Start the server.
- Parameters
-
cqs | Completion queues for handling asynchronous services. The caller is required to keep all completion queues live until the server is destroyed. |
num_cqs | How many completion queues does cqs hold. |
Implemented in grpc::Server.
◆ Wait()
virtual void grpc::ServerInterface::Wait |
( |
| ) |
|
|
pure virtual |
Block waiting for all work to complete.
- Warning
- The server must be either shutting down or some other thread must call Shutdown for this function to ever return.
Implemented in grpc::Server.
◆ ::grpc::Service
The documentation for this class was generated from the following file: