36 virtual std::optional<Target::ReadResult>
read();
37 virtual std::optional<Target::ReadResult>
readBlocking(std::chrono::steady_clock::duration timeout)
final;
90 using State = std::variant<WaitForConnectionRequest, WaitForConnection, Connected, Draining, Closed>;
110 template<QueueReadMode>
111 std::optional<Target::ReadResult>
readNext(std::chrono::steady_clock::duration timeout);
RAII Wrapper around a libfabric endpoint (fi_ep).
Non-owning view of a FabricInfo. Returned when iterating over a FabricInfoList.
RAII Wrapper around a libfabric passive endpoint (fid_pep).
RCTarget(PassiveEndpoint pep, std::unique_ptr< IngressProtocol > proto, std::shared_ptr< Domain > domain, TargetSetupOptions options)
Construct a new RCTarget associated with the given domain and passive endpoint.
std::optional< Target::ReadResult > readNext(std::chrono::steady_clock::duration timeout)
Internal method to drive progress based on the current state.
virtual std::optional< Target::ReadResult > read()
Determine if new data can be consumed.
static PassiveEndpoint makeListener(std::shared_ptr< Fabric > const &fabric)
State drain(Draining state, std::optional< Target::ReadResult > &result)
Read the completions that are left after the Initiator closed the connection.
std::shared_ptr< Domain > _domain
std::unique_ptr< IngressProtocol > _proto
TargetSetupOptions _setupOptions
static std::pair< std::unique_ptr< RCTarget >, std::unique_ptr< TargetInfo > > setup(mxlFabricsTargetConfig const &config, FabricInfoView info, TargetSetupOptions const &options={})
Set up a fresh RCTarget and its associated TargetInfo based on the given configuration.
std::variant< WaitForConnectionRequest, WaitForConnection, Connected, Draining, Closed > State
The internal state of the RCTarget.
virtual std::optional< Target::ReadResult > readBlocking(std::chrono::steady_clock::duration timeout) final
Determine if new data can be consumed.
static constexpr auto ShutdownTimeout
Upper bound for waiting on the local shutdown event in shutdown().
virtual void shutdown() final
Shut down the target gracefully. Initiates a graceful shutdown of the target and blocks until the shu...
void rejectPendingConnectionRequests()
Reject all connection requests that are queued on the passive endpoint.
Abstract base class for Target implementations.
struct mxlFabricsTargetConfig_t mxlFabricsTargetConfig
The wait for connection request state.
The wait for connection state.
Provider-independent tuning options for target setup.