cronet_channel_create.cc
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2016 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
20 
22 
23 #include "absl/status/statusor.h"
24 
25 #include <grpc/support/log.h>
26 
37 
38 // Cronet transport object
39 typedef struct cronet_transport {
40  grpc_transport base; // must be first element in this structure
41  void* engine;
42  char* host;
44 
46 
48  void* engine, const char* target, const grpc_channel_args* args,
49  void* reserved) {
51  "grpc_create_cronet_transport: stream_engine = %p, target=%s", engine,
52  target);
53 
54  // Disable client authority filter when using Cronet
59  .ToC();
60 
61  grpc_transport* ct =
62  grpc_create_cronet_transport(engine, target, args, reserved);
63 
65  auto channel =
69  return channel.ok() ? channel->release()->c_ptr() : nullptr;
70 }
log.h
core_configuration.h
grpc_transport_vtable
Definition: transport_impl.h:37
GRPC_CLIENT_DIRECT_CHANNEL
@ GRPC_CLIENT_DIRECT_CHANNEL
Definition: channel_stack_type.h:34
cronet_transport.h
grpc_core::ChannelArgs::FromC
static ChannelArgs FromC(const grpc_channel_args *args)
Definition: channel_args.cc:84
cronet_transport
struct cronet_transport cronet_transport
cronet_transport
Definition: cronet_channel_create.cc:39
grpc_create_cronet_transport
grpc_transport * grpc_create_cronet_transport(void *engine, const char *target, const grpc_channel_args *args, void *)
Definition: cronet_transport.cc:1476
grpc_channel_args
Definition: grpc_types.h:132
channel_args_preconditioning.h
grpc_cronet_vtable
grpc_transport_vtable grpc_cronet_vtable
cronet_transport::base
grpc_transport base
Definition: cronet_channel_create.cc:40
cronet_channel_create.h
channel
wrapped_grpc_channel * channel
Definition: src/php/ext/grpc/call.h:33
asyncio_get_stats.args
args
Definition: asyncio_get_stats.py:40
grpc_core::CoreConfiguration::Get
static const CoreConfiguration & Get()
Definition: core_configuration.h:82
gpr_log
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
cronet_transport::engine
void * engine
Definition: cronet_channel_create.cc:41
grpc_cronet_secure_channel_create
GRPCAPI grpc_channel * grpc_cronet_secure_channel_create(void *engine, const char *target, const grpc_channel_args *args, void *reserved)
Definition: cronet_channel_create.cc:47
grpc_core::ChannelArgs::ToC
const grpc_channel_args * ToC() const
Definition: channel_args.cc:94
grpc_channel_args_destroy
void grpc_channel_args_destroy(grpc_channel_args *a)
Definition: channel_args.cc:360
channel_stack_type.h
grpc_core::CoreConfiguration::channel_args_preconditioning
const ChannelArgsPreconditioning & channel_args_preconditioning() const
Definition: core_configuration.h:139
grpc_core::ExecCtx
Definition: exec_ctx.h:97
transport_fwd.h
grpc_core::ChannelArgs::Set
GRPC_MUST_USE_RESULT ChannelArgs Set(absl::string_view name, Value value) const
Definition: channel_args.cc:113
GRPC_ARG_DISABLE_CLIENT_AUTHORITY_FILTER
#define GRPC_ARG_DISABLE_CLIENT_AUTHORITY_FILTER
Definition: grpc_types.h:412
cronet_transport::host
char * host
Definition: cronet_channel_create.cc:42
exec_ctx
grpc_core::ExecCtx exec_ctx
Definition: end2end_binder_transport_test.cc:75
exec_ctx.h
ref_counted_ptr.h
grpc_channel
struct grpc_channel grpc_channel
Definition: grpc_types.h:62
grpc_transport
Definition: transport_impl.h:89
GRPCAPI
#define GRPCAPI
Definition: impl/codegen/port_platform.h:664
channel_args.h
GPR_DEBUG
#define GPR_DEBUG
Definition: include/grpc/impl/codegen/log.h:55
transport_impl.h
setup.target
target
Definition: third_party/bloaty/third_party/protobuf/python/setup.py:179
grpc_core::ChannelArgsPreconditioning::PreconditionChannelArgs
ChannelArgs PreconditionChannelArgs(const grpc_channel_args *args) const
Definition: channel_args_preconditioning.cc:34
grpc_core::Channel::Create
static absl::StatusOr< RefCountedPtr< Channel > > Create(const char *target, ChannelArgs args, grpc_channel_stack_type channel_stack_type, grpc_transport *optional_transport)
Definition: channel.cc:202
channel.h
port_platform.h


grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:59:00