GRPC C++  1.8.0
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Public Member Functions | Static Public Member Functions | Friends
grpc::Server Class Referencefinal

Represents a gRPC server. More...

#include <server.h>

Data Structures

class  GlobalCallbacks
 Global callbacks are a set of hooks that are called when server events occur. More...
 

Public Member Functions

 ~Server ()
 
void Wait () override
 Block until the server shuts down. More...
 
grpc_serverc_server ()
 
HealthCheckServiceInterfaceGetHealthCheckService () const
 Returns the health check service. More...
 
std::shared_ptr< ChannelInProcessChannel (const ChannelArguments &args)
 Establish a channel for in-process communication. More...
 
- Public Member Functions inherited from grpc::ServerInterface
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...
 
- Public Member Functions inherited from grpc::internal::CallHook
virtual ~CallHook ()
 

Static Public Member Functions

static void SetGlobalCallbacks (GlobalCallbacks *callbacks)
 Set the global callback object. More...
 

Friends

class AsyncGenericService
 
class ServerBuilder
 
class ServerInitializer
 

Additional Inherited Members

- Protected Member Functions inherited from grpc::ServerInterface
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)
 

Detailed Description

Represents a gRPC server.

Use a grpc::ServerBuilder to create, configure, and start Server instances.

Constructor & Destructor Documentation

grpc::Server::~Server ( )

Member Function Documentation

grpc_server* grpc::Server::c_server ( )
HealthCheckServiceInterface* grpc::Server::GetHealthCheckService ( ) const
inline

Returns the health check service.

std::shared_ptr<Channel> grpc::Server::InProcessChannel ( const ChannelArguments args)

Establish a channel for in-process communication.

static void grpc::Server::SetGlobalCallbacks ( GlobalCallbacks callbacks)
static

Set the global callback object.

Can only be called once per application. Does not take ownership of callbacks, and expects the pointed to object to be alive until all server objects in the process have been destroyed. The same GlobalCallbacks object will be used throughout the application and is shared among all Server objects.

void grpc::Server::Wait ( )
overridevirtual

Block until the server shuts down.

Warning
The server must be either shutting down or some other thread must call Shutdown for this function to ever return.

Implements grpc::ServerInterface.

Friends And Related Function Documentation

friend class AsyncGenericService
friend
friend class ServerBuilder
friend
friend class ServerInitializer
friend

The documentation for this class was generated from the following file: