1 // Copyright 2022 gRPC Authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_H 15 #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_H 16 17 #include <grpc/support/port_platform.h> 18 19 #include <grpc/event_engine/endpoint_config.h> 20 #include <grpc/event_engine/event_engine.h> 21 #include <grpc/event_engine/memory_allocator.h> 22 #include <grpc/event_engine/slice_buffer.h> 23 24 #include "src/core/lib/event_engine/extensions/can_track_errors.h" 25 #include "src/core/lib/event_engine/extensions/chaotic_good_extension.h" 26 #include "src/core/lib/event_engine/extensions/supports_fd.h" 27 #include "src/core/lib/event_engine/query_extensions.h" 28 29 namespace grpc_event_engine { 30 namespace experimental { 31 32 /// This defines an interface that posix specific EventEngines endpoints 33 /// may implement to support additional chaotic good related functionality. 34 class PosixEndpointWithChaoticGoodSupport 35 : public ExtendedType<EventEngine::Endpoint, ChaoticGoodExtension, 36 EndpointSupportsFdExtension, 37 EndpointCanTrackErrorsExtension> {}; 38 39 /// This defines an interface that posix specific EventEngines endpoints 40 /// may implement to support additional file descriptor related functionality. 41 class PosixEndpointWithFdSupport 42 : public ExtendedType<EventEngine::Endpoint, EndpointSupportsFdExtension, 43 EndpointCanTrackErrorsExtension> {}; 44 45 /// Defines an interface that posix EventEngine listeners may implement to 46 /// support additional file descriptor related functionality. 47 class PosixListenerWithFdSupport 48 : public ExtendedType<EventEngine::Listener, ListenerSupportsFdExtension> { 49 }; 50 51 /// Defines an interface that posix EventEngines may implement to 52 /// support additional file descriptor related functionality. 53 class PosixEventEngineWithFdSupport 54 : public ExtendedType<EventEngine, EventEngineSupportsFdExtension> {}; 55 56 } // namespace experimental 57 } // namespace grpc_event_engine 58 59 #endif // GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_H 60