GRPC C++  1.39.1
Data Structures | Public Member Functions | Data Fields | Static Public Attributes
grpc_core::Server Class Reference

#include <server.h>

Data Structures

class  AllocatingRequestMatcherBase
 
class  AllocatingRequestMatcherBatch
 
class  AllocatingRequestMatcherRegistered
 
struct  BatchCallAllocation
 
class  ListenerInterface
 Interface for listeners. More...
 
class  RealRequestMatcher
 
struct  RegisteredCallAllocation
 
struct  RegisteredMethod
 
struct  RequestedCall
 
class  RequestMatcherInterface
 

Public Member Functions

 Server (const grpc_channel_args *args)
 
 ~Server () override
 
void Orphan () ABSL_LOCKS_EXCLUDED(mu_global_) override
 
const grpc_channel_argschannel_args () const
 
grpc_resource_userdefault_resource_user () const
 
channelz::ServerNodechannelz_node () const
 
const std::vector< grpc_pollset * > & pollsets () const
 
grpc_server_config_fetcherconfig_fetcher () const
 
void set_config_fetcher (std::unique_ptr< grpc_server_config_fetcher > config_fetcher)
 
bool HasOpenConnections () ABSL_LOCKS_EXCLUDED(mu_global_)
 
void AddListener (OrphanablePtr< ListenerInterface > listener)
 
void Start () ABSL_LOCKS_EXCLUDED(mu_global_)
 
grpc_error_handle SetupTransport (grpc_transport *transport, grpc_pollset *accepting_pollset, const grpc_channel_args *args, const RefCountedPtr< channelz::SocketNode > &socket_node, grpc_resource_user *resource_user=nullptr)
 
void RegisterCompletionQueue (grpc_completion_queue *cq)
 
void SetRegisteredMethodAllocator (grpc_completion_queue *cq, void *method_tag, std::function< RegisteredCallAllocation()> allocator)
 
void SetBatchMethodAllocator (grpc_completion_queue *cq, std::function< BatchCallAllocation()> allocator)
 
RegisteredMethodRegisterMethod (const char *method, const char *host, grpc_server_register_method_payload_handling payload_handling, uint32_t flags)
 
grpc_call_error RequestCall (grpc_call **call, grpc_call_details *details, grpc_metadata_array *request_metadata, grpc_completion_queue *cq_bound_to_call, grpc_completion_queue *cq_for_notification, void *tag)
 
grpc_call_error RequestRegisteredCall (RegisteredMethod *rm, grpc_call **call, gpr_timespec *deadline, grpc_metadata_array *request_metadata, grpc_byte_buffer **optional_payload, grpc_completion_queue *cq_bound_to_call, grpc_completion_queue *cq_for_notification, void *tag_new)
 
void ShutdownAndNotify (grpc_completion_queue *cq, void *tag) ABSL_LOCKS_EXCLUDED(mu_global_
 
void CancelAllCalls () ABSL_LOCKS_EXCLUDED(mu_global_)
 
- Public Member Functions inherited from grpc_core::InternallyRefCounted< Server >
 InternallyRefCounted (const InternallyRefCounted &)=delete
 
InternallyRefCountedoperator= (const InternallyRefCounted &)=delete
 
- Public Member Functions inherited from grpc_core::Orphanable
 Orphanable (const Orphanable &)=delete
 
Orphanableoperator= (const Orphanable &)=delete
 

Data Fields

void mu_call_
 

Static Public Attributes

static const grpc_channel_filter kServerTopFilter
 

Additional Inherited Members

- Protected Member Functions inherited from grpc_core::InternallyRefCounted< Server >
 InternallyRefCounted (const char *trace=nullptr, intptr_t initial_refcount=1)
 
 ~InternallyRefCounted () override=default
 
RefCountedPtr< ServerRef () GRPC_MUST_USE_RESULT
 
RefCountedPtr< ServerRef (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT
 
void Unref ()
 
void Unref (const DebugLocation &location, const char *reason)
 
- Protected Member Functions inherited from grpc_core::Orphanable
 Orphanable ()
 
virtual ~Orphanable ()
 

Constructor & Destructor Documentation

◆ Server()

grpc_core::Server::Server ( const grpc_channel_args args)
explicit

◆ ~Server()

grpc_core::Server::~Server ( )
override

Member Function Documentation

◆ AddListener()

void grpc_core::Server::AddListener ( OrphanablePtr< ListenerInterface listener)

◆ CancelAllCalls()

void grpc_core::Server::CancelAllCalls ( )

◆ channel_args()

const grpc_channel_args* grpc_core::Server::channel_args ( ) const
inline

◆ channelz_node()

channelz::ServerNode* grpc_core::Server::channelz_node ( ) const
inline

◆ config_fetcher()

grpc_server_config_fetcher* grpc_core::Server::config_fetcher ( ) const
inline

◆ default_resource_user()

grpc_resource_user* grpc_core::Server::default_resource_user ( ) const
inline

◆ HasOpenConnections()

bool grpc_core::Server::HasOpenConnections ( )

◆ Orphan()

void grpc_core::Server::Orphan ( )
overridevirtual

Implements grpc_core::Orphanable.

◆ pollsets()

const std::vector<grpc_pollset*>& grpc_core::Server::pollsets ( ) const
inline

◆ RegisterCompletionQueue()

void grpc_core::Server::RegisterCompletionQueue ( grpc_completion_queue cq)

◆ RegisterMethod()

Server::RegisteredMethod * grpc_core::Server::RegisterMethod ( const char *  method,
const char *  host,
grpc_server_register_method_payload_handling  payload_handling,
uint32_t  flags 
)

◆ RequestCall()

grpc_call_error grpc_core::Server::RequestCall ( grpc_call **  call,
grpc_call_details details,
grpc_metadata_array request_metadata,
grpc_completion_queue cq_bound_to_call,
grpc_completion_queue cq_for_notification,
void *  tag 
)

◆ RequestRegisteredCall()

grpc_call_error grpc_core::Server::RequestRegisteredCall ( RegisteredMethod rm,
grpc_call **  call,
gpr_timespec deadline,
grpc_metadata_array request_metadata,
grpc_byte_buffer **  optional_payload,
grpc_completion_queue cq_bound_to_call,
grpc_completion_queue cq_for_notification,
void *  tag_new 
)

◆ set_config_fetcher()

void grpc_core::Server::set_config_fetcher ( std::unique_ptr< grpc_server_config_fetcher config_fetcher)
inline

◆ SetBatchMethodAllocator()

void grpc_core::Server::SetBatchMethodAllocator ( grpc_completion_queue cq,
std::function< BatchCallAllocation()>  allocator 
)

◆ SetRegisteredMethodAllocator()

void grpc_core::Server::SetRegisteredMethodAllocator ( grpc_completion_queue cq,
void *  method_tag,
std::function< RegisteredCallAllocation()>  allocator 
)

◆ SetupTransport()

grpc_error_handle grpc_core::Server::SetupTransport ( grpc_transport transport,
grpc_pollset accepting_pollset,
const grpc_channel_args args,
const RefCountedPtr< channelz::SocketNode > &  socket_node,
grpc_resource_user resource_user = nullptr 
)

◆ ShutdownAndNotify()

void grpc_core::Server::ShutdownAndNotify ( grpc_completion_queue cq,
void *  tag 
)

◆ Start()

void grpc_core::Server::Start ( )

Field Documentation

◆ kServerTopFilter

const grpc_channel_filter grpc_core::Server::kServerTopFilter
static
Initial value:
= {
Server::CallData::StartTransportStreamOpBatch,
sizeof(Server::CallData),
Server::CallData::InitCallElement,
Server::CallData::DestroyCallElement,
sizeof(Server::ChannelData),
Server::ChannelData::InitChannelElement,
Server::ChannelData::DestroyChannelElement,
"server",
}
void grpc_channel_next_get_info(grpc_channel_element *elem, const grpc_channel_info *channel_info)
Definition: channel_stack.cc:243
void grpc_call_stack_ignore_set_pollset_or_pollset_set(grpc_call_element *, grpc_polling_entity *)
Definition: channel_stack.cc:218
void grpc_channel_next_op(grpc_channel_element *elem, grpc_transport_op *op)
Definition: channel_stack.cc:249

◆ mu_call_

void grpc_core::Server::mu_call_

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