• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *
3  * Copyright 2015 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 
19 #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CHTTP2_TRANSPORT_H
20 #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CHTTP2_TRANSPORT_H
21 
22 #include <grpc/support/port_platform.h>
23 
24 #include "src/core/lib/debug/trace.h"
25 #include "src/core/lib/iomgr/endpoint.h"
26 #include "src/core/lib/transport/transport.h"
27 
28 extern grpc_core::TraceFlag grpc_http_trace;
29 extern grpc_core::TraceFlag grpc_trace_http2_stream_state;
30 extern grpc_core::DebugOnlyTraceFlag grpc_trace_chttp2_refcount;
31 
32 extern bool g_flow_control_enabled;
33 
34 grpc_transport* grpc_create_chttp2_transport(
35     const grpc_channel_args* channel_args, grpc_endpoint* ep, bool is_client);
36 
37 /// Takes ownership of \a read_buffer, which (if non-NULL) contains
38 /// leftover bytes previously read from the endpoint (e.g., by handshakers).
39 /// If non-null, \a notify_on_receive_settings will be scheduled when
40 /// HTTP/2 settings are received from the peer.
41 void grpc_chttp2_transport_start_reading(
42     grpc_transport* transport, grpc_slice_buffer* read_buffer,
43     grpc_closure* notify_on_receive_settings);
44 
45 #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CHTTP2_TRANSPORT_H */
46