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/event_engine/endpoint_config.h> 18 #include <grpc/event_engine/event_engine.h> 19 #include <grpc/event_engine/memory_allocator.h> 20 #include <grpc/event_engine/slice_buffer.h> 21 #include <grpc/support/port_platform.h> 22 23 #include "src/core/lib/event_engine/extensions/can_track_errors.h" 24 #include "src/core/lib/event_engine/extensions/chaotic_good_extension.h" 25 #include "src/core/lib/event_engine/extensions/supports_fd.h" 26 #include "src/core/lib/event_engine/query_extensions.h" 27 28 namespace grpc_event_engine { 29 namespace experimental { 30 31 /// This defines an interface that posix specific EventEngines endpoints 32 /// may implement to support additional chaotic good related functionality. 33 class PosixEndpointWithChaoticGoodSupport 34 : public ExtendedType<EventEngine::Endpoint, ChaoticGoodExtension, 35 EndpointSupportsFdExtension, 36 EndpointCanTrackErrorsExtension> {}; 37 38 /// This defines an interface that posix specific EventEngines endpoints 39 /// may implement to support additional file descriptor related functionality. 40 class PosixEndpointWithFdSupport 41 : public ExtendedType<EventEngine::Endpoint, EndpointSupportsFdExtension, 42 EndpointCanTrackErrorsExtension> {}; 43 44 /// Defines an interface that posix EventEngine listeners may implement to 45 /// support additional file descriptor related functionality. 46 class PosixListenerWithFdSupport 47 : public ExtendedType<EventEngine::Listener, ListenerSupportsFdExtension> { 48 }; 49 50 /// Defines an interface that posix EventEngines may implement to 51 /// support additional file descriptor related functionality. 52 class PosixEventEngineWithFdSupport 53 : public ExtendedType<EventEngine, EventEngineSupportsFdExtension> {}; 54 55 } // namespace experimental 56 } // namespace grpc_event_engine 57 58 #endif // GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_H 59