GRPC C++  1.66.0
passive_listener.h
Go to the documentation of this file.
1 // Copyright 2024 The 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_PASSIVE_LISTENER_H
15 #define GRPC_PASSIVE_LISTENER_H
16 
17 #include <memory>
18 
20 #include <grpc/grpc.h>
21 // #include <grpc/support/port_platform.h>
22 
23 namespace grpc_core {
24 class Server;
25 
26 namespace experimental {
27 class PassiveListenerImpl;
28 
32  public:
33  virtual ~PassiveListener() = default;
41  std::unique_ptr<grpc_event_engine::experimental::EventEngine::Endpoint>
42  endpoint) = 0;
43 
51  virtual absl::Status AcceptConnectedFd(int fd) = 0;
52 };
53 
54 } // namespace experimental
55 } // namespace grpc_core
56 
58  grpc_core::Server* server, grpc_server_credentials* credentials,
59  std::shared_ptr<grpc_core::experimental::PassiveListenerImpl>
60  passive_listener);
61 
62 #endif /* GRPC_PASSIVE_LISTENER_H */
grpc_core
Definition: grpc_audit_logging.h:31
event_engine.h
grpc_server_add_passive_listener
absl::Status grpc_server_add_passive_listener(grpc_core::Server *server, grpc_server_credentials *credentials, std::shared_ptr< grpc_core::experimental::PassiveListenerImpl > passive_listener)
grpc.h
grpc_core::experimental::PassiveListener
– EXPERIMENTAL API – Interface for used for Server Endpoint injection.
Definition: passive_listener.h:31
grpc_core::experimental::PassiveListener::AcceptConnectedEndpoint
virtual absl::Status AcceptConnectedEndpoint(std::unique_ptr< grpc_event_engine::experimental::EventEngine::Endpoint > endpoint)=0
– EXPERIMENTAL API –
grpc_core::experimental::PassiveListener::~PassiveListener
virtual ~PassiveListener()=default
grpc_core::experimental::PassiveListener::AcceptConnectedFd
virtual absl::Status AcceptConnectedFd(int fd)=0
– EXPERIMENTAL API –
grpc_server_credentials
struct grpc_server_credentials grpc_server_credentials
— grpc_server_credentials object.
Definition: grpc.h:299
grpc::protobuf::util::Status
::absl::Status Status
Definition: config_protobuf.h:106