Move platform-specific sockaddr logic out of port_platform for EventEngine (#25886)

pull/25887/head
AJ Heller 4 years ago committed by GitHub
parent 9a2c2c0afc
commit 03adef1d3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      BUILD
  2. 1
      BUILD.gn
  3. 2
      CMakeLists.txt
  4. 2
      Makefile
  5. 2
      build_autogenerated.yaml
  6. 1
      grpc.gemspec
  7. 1
      include/grpc/event_engine/event_engine.h
  8. 39
      include/grpc/event_engine/port.h
  9. 20
      include/grpc/impl/codegen/port_platform.h
  10. 1
      package.xml
  11. 1
      src/core/lib/event_engine/sockaddr.cc
  12. 1
      tools/doxygen/Doxyfile.c++
  13. 1
      tools/doxygen/Doxyfile.c++.internal
  14. 1
      tools/doxygen/Doxyfile.core
  15. 1
      tools/doxygen/Doxyfile.core.internal

@ -131,6 +131,7 @@ GRPC_PUBLIC_HDRS = [
GRPC_PUBLIC_EVENT_ENGINE_HDRS = [
"include/grpc/event_engine/channel_args.h",
"include/grpc/event_engine/event_engine.h",
"include/grpc/event_engine/port.h",
"include/grpc/event_engine/slice_allocator.h",
]

@ -201,6 +201,7 @@ config("grpc_config") {
"include/grpc/compression.h",
"include/grpc/event_engine/channel_args.h",
"include/grpc/event_engine/event_engine.h",
"include/grpc/event_engine/port.h",
"include/grpc/event_engine/slice_allocator.h",
"include/grpc/fork.h",
"include/grpc/grpc.h",

@ -2086,6 +2086,7 @@ foreach(_hdr
include/grpc/compression.h
include/grpc/event_engine/channel_args.h
include/grpc/event_engine/event_engine.h
include/grpc/event_engine/port.h
include/grpc/event_engine/slice_allocator.h
include/grpc/fork.h
include/grpc/grpc.h
@ -2638,6 +2639,7 @@ foreach(_hdr
include/grpc/compression.h
include/grpc/event_engine/channel_args.h
include/grpc/event_engine/event_engine.h
include/grpc/event_engine/port.h
include/grpc/event_engine/slice_allocator.h
include/grpc/fork.h
include/grpc/grpc.h

@ -1599,6 +1599,7 @@ PUBLIC_HEADERS_C += \
include/grpc/compression.h \
include/grpc/event_engine/channel_args.h \
include/grpc/event_engine/event_engine.h \
include/grpc/event_engine/port.h \
include/grpc/event_engine/slice_allocator.h \
include/grpc/fork.h \
include/grpc/grpc.h \
@ -2001,6 +2002,7 @@ PUBLIC_HEADERS_C += \
include/grpc/compression.h \
include/grpc/event_engine/channel_args.h \
include/grpc/event_engine/event_engine.h \
include/grpc/event_engine/port.h \
include/grpc/event_engine/slice_allocator.h \
include/grpc/fork.h \
include/grpc/grpc.h \

@ -370,6 +370,7 @@ libs:
- include/grpc/compression.h
- include/grpc/event_engine/channel_args.h
- include/grpc/event_engine/event_engine.h
- include/grpc/event_engine/port.h
- include/grpc/event_engine/slice_allocator.h
- include/grpc/fork.h
- include/grpc/grpc.h
@ -1582,6 +1583,7 @@ libs:
- include/grpc/compression.h
- include/grpc/event_engine/channel_args.h
- include/grpc/event_engine/event_engine.h
- include/grpc/event_engine/port.h
- include/grpc/event_engine/slice_allocator.h
- include/grpc/fork.h
- include/grpc/grpc.h

@ -55,6 +55,7 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/compression.h )
s.files += %w( include/grpc/event_engine/channel_args.h )
s.files += %w( include/grpc/event_engine/event_engine.h )
s.files += %w( include/grpc/event_engine/port.h )
s.files += %w( include/grpc/event_engine/slice_allocator.h )
s.files += %w( include/grpc/fork.h )
s.files += %w( include/grpc/grpc.h )

@ -24,6 +24,7 @@
#include "absl/time/time.h"
#include "grpc/event_engine/channel_args.h"
#include "grpc/event_engine/port.h"
#include "grpc/event_engine/slice_allocator.h"
// TODO(hork): explicitly define lifetimes and ownership of all objects.

@ -0,0 +1,39 @@
// Copyright 2021 The gRPC Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef GRPC_EVENT_ENGINE_PORT_H
#define GRPC_EVENT_ENGINE_PORT_H
#include <grpc/support/port_platform.h>
// Platform-specific sockaddr includes
#ifdef GRPC_UV
#include <uv.h>
#elif defined(GPR_ANDROID) || defined(GPR_LINUX) || defined(GPR_APPLE) || \
defined(GPR_FREEBSD) || defined(GPR_OPENBSD) || defined(GPR_SOLARIS) || \
defined(GPR_AIX) || defined(GPR_NACL) || defined(GPR_FUCHSIA) || \
defined(GRPC_POSIX_SOCKET)
#define GRPC_EVENT_ENGINE_POSIX
#include <netdb.h>
#include <netinet/in.h>
#include <sys/socket.h>
#elif defined(GPR_WINDOWS)
#include <winsock2.h>
#include <ws2tcpip.h>
// must be included after the above
#include <mswsock.h>
#else
#error UNKNOWN PLATFORM
#endif
#endif // GRPC_EVENT_ENGINE_PORT_H

@ -659,24 +659,4 @@ typedef unsigned __int64 uint64_t;
#define __STDC_FORMAT_MACROS
#endif
// Platform-specific sockaddr includes
#ifdef GRPC_UV
#include <uv.h>
#elif defined(GPR_ANDROID) || defined(GPR_LINUX) || defined(GPR_APPLE) || \
defined(GPR_FREEBSD) || defined(GPR_OPENBSD) || defined(GPR_SOLARIS) || \
defined(GPR_AIX) || defined(GPR_NACL) || defined(GPR_FUCHSIA) || \
defined(GRPC_POSIX_SOCKET)
#define GRPC_EVENT_ENGINE_POSIX
#include <netdb.h>
#include <netinet/in.h>
#include <sys/socket.h>
#elif defined(GPR_WINDOWS)
#include <winsock2.h>
#include <ws2tcpip.h>
// must be included after the above
#include <mswsock.h>
#else
#error UNKNOWN PLATFORM
#endif
#endif /* GRPC_IMPL_CODEGEN_PORT_PLATFORM_H */

@ -35,6 +35,7 @@
<file baseinstalldir="/" name="include/grpc/compression.h" role="src" />
<file baseinstalldir="/" name="include/grpc/event_engine/channel_args.h" role="src" />
<file baseinstalldir="/" name="include/grpc/event_engine/event_engine.h" role="src" />
<file baseinstalldir="/" name="include/grpc/event_engine/port.h" role="src" />
<file baseinstalldir="/" name="include/grpc/event_engine/slice_allocator.h" role="src" />
<file baseinstalldir="/" name="include/grpc/fork.h" role="src" />
<file baseinstalldir="/" name="include/grpc/grpc.h" role="src" />

@ -16,6 +16,7 @@
#include <string.h>
#include "grpc/event_engine/event_engine.h"
#include "grpc/event_engine/port.h"
#include "grpc/support/log.h"
namespace grpc_event_engine {

@ -883,6 +883,7 @@ include/grpc/census.h \
include/grpc/compression.h \
include/grpc/event_engine/channel_args.h \
include/grpc/event_engine/event_engine.h \
include/grpc/event_engine/port.h \
include/grpc/event_engine/slice_allocator.h \
include/grpc/fork.h \
include/grpc/grpc.h \

@ -883,6 +883,7 @@ include/grpc/census.h \
include/grpc/compression.h \
include/grpc/event_engine/channel_args.h \
include/grpc/event_engine/event_engine.h \
include/grpc/event_engine/port.h \
include/grpc/event_engine/slice_allocator.h \
include/grpc/fork.h \
include/grpc/grpc.h \

@ -813,6 +813,7 @@ include/grpc/census.h \
include/grpc/compression.h \
include/grpc/event_engine/channel_args.h \
include/grpc/event_engine/event_engine.h \
include/grpc/event_engine/port.h \
include/grpc/event_engine/slice_allocator.h \
include/grpc/fork.h \
include/grpc/grpc.h \

@ -813,6 +813,7 @@ include/grpc/census.h \
include/grpc/compression.h \
include/grpc/event_engine/channel_args.h \
include/grpc/event_engine/event_engine.h \
include/grpc/event_engine/port.h \
include/grpc/event_engine/slice_allocator.h \
include/grpc/fork.h \
include/grpc/grpc.h \

Loading…
Cancel
Save