blob: ba7db8a0f7ff0df8eba6756468741c351909341e [file] [log] [blame]
murgatroid999030c812016-09-16 13:25:08 -07001/*
2 *
Jan Tattermusch7897ae92017-06-07 22:57:36 +02003 * Copyright 2016 gRPC authors.
murgatroid999030c812016-09-16 13:25:08 -07004 *
Jan Tattermusch7897ae92017-06-07 22:57:36 +02005 * 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
murgatroid999030c812016-09-16 13:25:08 -07008 *
Jan Tattermusch7897ae92017-06-07 22:57:36 +02009 * http://www.apache.org/licenses/LICENSE-2.0
murgatroid999030c812016-09-16 13:25:08 -070010 *
Jan Tattermusch7897ae92017-06-07 22:57:36 +020011 * 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.
murgatroid999030c812016-09-16 13:25:08 -070016 *
17 */
18
19#ifndef GRPC_CORE_LIB_IOMGR_TCP_UV_H
20#define GRPC_CORE_LIB_IOMGR_TCP_UV_H
21/*
22 Low level TCP "bottom half" implementation, for use by transports built on
23 top of a TCP connection.
24
25 Note that this file does not (yet) include APIs for creating the socket in
26 the first place.
27
28 All calls passing slice transfer ownership of a slice refcount unless
29 otherwise specified.
30*/
31
Craig Tiller1dbd0632017-05-04 16:48:32 -070032#include "src/core/lib/debug/trace.h"
murgatroid999030c812016-09-16 13:25:08 -070033#include "src/core/lib/iomgr/endpoint.h"
34
35#include <uv.h>
36
Craig Tiller1dbd0632017-05-04 16:48:32 -070037extern grpc_tracer_flag grpc_tcp_trace;
murgatroid999030c812016-09-16 13:25:08 -070038
39#define GRPC_TCP_DEFAULT_READ_SLICE_SIZE 8192
40
Yash Tibrewala7e6d652017-09-20 18:56:37 -070041#ifdef __cplusplus
42extern "C" {
43#endif
44
murgatroid9969259d42016-10-31 14:34:10 -070045grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle,
46 grpc_resource_quota *resource_quota,
47 char *peer_string);
murgatroid999030c812016-09-16 13:25:08 -070048
Yash Tibrewala7e6d652017-09-20 18:56:37 -070049#ifdef __cplusplus
50}
51#endif
52
53#endif /* GRPC_CORE_LIB_IOMGR_TCP_UV_H */