Namespaces | Functions
chttp2_server.cc File Reference
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/server/chttp2_server.h"
#include <inttypes.h>
#include <limits.h>
#include <string.h>
#include <algorithm>
#include <map>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "absl/base/thread_annotations.h"
#include "absl/memory/memory.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
#include "absl/strings/string_view.h"
#include "absl/strings/strip.h"
#include <grpc/grpc.h>
#include <grpc/grpc_posix.h>
#include <grpc/impl/codegen/grpc_types.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/time.h>
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/ext/transport/chttp2/transport/frame.h"
#include "src/core/ext/transport/chttp2/transport/internal.h"
#include "src/core/lib/address_utils/sockaddr_utils.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channelz.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/gprpp/debug_location.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/gprpp/unique_type_name.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/endpoint.h"
#include "src/core/lib/iomgr/iomgr_fwd.h"
#include "src/core/lib/iomgr/pollset.h"
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/iomgr/resolve_address.h"
#include "src/core/lib/iomgr/resolved_address.h"
#include "src/core/lib/iomgr/tcp_server.h"
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/iomgr/unix_sockets_posix.h"
#include "src/core/lib/resource_quota/api.h"
#include "src/core/lib/resource_quota/memory_quota.h"
#include "src/core/lib/resource_quota/resource_quota.h"
#include "src/core/lib/security/credentials/credentials.h"
#include "src/core/lib/security/credentials/insecure/insecure_credentials.h"
#include "src/core/lib/security/security_connector/security_connector.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/server.h"
#include "src/core/lib/transport/error_utils.h"
#include "src/core/lib/transport/handshaker.h"
#include "src/core/lib/transport/handshaker_registry.h"
#include "src/core/lib/transport/transport.h"
#include "src/core/lib/transport/transport_fwd.h"
#include "src/core/lib/uri/uri_parser.h"

Go to the source code of this file.

Namespaces

 grpc_core
 

Functions

grpc_error_handle grpc_core::Chttp2ServerAddPort (Server *server, const char *addr, grpc_channel_args *args, Chttp2ServerArgsModifier args_modifier, int *port_num)
 
void grpc_server_add_channel_from_fd (grpc_server *, int, grpc_server_credentials *)
 
int grpc_server_add_http2_port (grpc_server *server, const char *addr, grpc_server_credentials *creds)
 

Function Documentation

◆ grpc_server_add_channel_from_fd()

void grpc_server_add_channel_from_fd ( grpc_server server,
int  fd,
grpc_server_credentials creds 
)

Add the connected secure communication channel based on file descriptor 'fd' to the 'server' and server credentials 'creds'. The 'fd' must be an open file descriptor corresponding to a connected socket. Events from the file descriptor may come on any of the server completion queues (i.e completion queues registered via the grpc_server_register_completion_queue API). Note that this API currently only supports inseure server credentials Using other types of credentials will result in a failure. TODO(hork): add channel_args to this API to allow endpoints and transports created in this function to participate in the resource quota feature.

Definition at line 1125 of file chttp2_server.cc.

◆ grpc_server_add_http2_port()

int grpc_server_add_http2_port ( grpc_server server,
const char *  addr,
grpc_server_credentials creds 
)

Add a HTTP2 over an encrypted link over tcp listener. Returns bound port number on success, 0 on failure. REQUIRES: server not started

Definition at line 1029 of file chttp2_server.cc.

Variable Documentation

◆ accepting_pollset_

grpc_pollset* const accepting_pollset_
private

Definition at line 170 of file chttp2_server.cc.

◆ acceptor_

grpc_tcp_server_acceptor* acceptor_
private

Definition at line 171 of file chttp2_server.cc.

◆ args_

grpc_channel_args* args_
private

Definition at line 265 of file chttp2_server.cc.

◆ args_modifier_

const Chttp2ServerArgsModifier args_modifier_
private

Definition at line 263 of file chttp2_server.cc.

◆ channelz_listen_socket_

RefCountedPtr<channelz::ListenSocketNode> channelz_listen_socket_
private

Definition at line 281 of file chttp2_server.cc.

◆ config_fetcher_watcher_

ConfigFetcherWatcher* config_fetcher_watcher_ = nullptr
private

Definition at line 264 of file chttp2_server.cc.

◆ connection_

grpc_closure on_receive_settings_ ABSL_GUARDED_BY& connection_
private

Definition at line 169 of file chttp2_server.cc.

◆ deadline_

const Timestamp deadline_
private

Definition at line 175 of file chttp2_server.cc.

◆ drain_grace_timer_

grpc_timer drain_grace_timer_
private

Definition at line 211 of file chttp2_server.cc.

◆ interested_parties_

grpc_pollset_set* const interested_parties_
private

Definition at line 179 of file chttp2_server.cc.

◆ listener_

Mutex mu_ ABSL_ACQUIRED_AFTER& listener_
private

Definition at line 144 of file chttp2_server.cc.

◆ memory_quota_

MemoryQuotaRefPtr memory_quota_
private

Definition at line 282 of file chttp2_server.cc.

◆ mu_

Mutex mu_ = nullptr
private

Definition at line 206 of file chttp2_server.cc.

◆ on_close_

grpc_closure on_close_
private

Definition at line 210 of file chttp2_server.cc.

◆ on_drain_grace_time_expiry_

grpc_closure on_drain_grace_time_expiry_
private

Definition at line 212 of file chttp2_server.cc.

◆ resolved_address_

grpc_resolved_address resolved_address_
private

Definition at line 262 of file chttp2_server.cc.

◆ server_

Server* const server_
private

Definition at line 260 of file chttp2_server.cc.

◆ tcp_server_

grpc_tcp_server* tcp_server_
private

Definition at line 261 of file chttp2_server.cc.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:06