|
MXL : Media eXchange Layer
MXL
|
RAII Wrapper around a libfabric passive endpoint (fid_pep). More...
#include <PassiveEndpoint.hpp>
Public Member Functions | |
| void | bind (std::shared_ptr< EventQueue > eq) |
| Bind the endpoint to an event queue. | |
| std::shared_ptr< EventQueue > | eventQueue () const |
| Accessor for the associated event queue. | |
| Endpoint::Id | id () const noexcept |
| Get the endpoints id. | |
| void | listen () |
| Put the passive endpoint into listening mode. | |
| RawFabricAddress | localAddress () |
| Obtain the local fabric address for this passive endpoint. | |
| PassiveEndpoint & | operator= (PassiveEndpoint &&) |
| void | operator= (PassiveEndpoint const &)=delete |
| PassiveEndpoint (PassiveEndpoint &&) noexcept | |
| PassiveEndpoint (PassiveEndpoint const &)=delete | |
| ::fid_pep const * | raw () const noexcept |
| Access the underlying raw fid_pep pointer. | |
| ::fid_pep * | raw () noexcept |
| Access the underlying raw fid_pep pointer. | |
| void | reject (Event &entry) |
| Reject a connection request event. | |
| ~PassiveEndpoint () | |
Static Public Member Functions | |
| static PassiveEndpoint | create (std::shared_ptr< Fabric > fabric) |
| Allocate a new PassiveEndpoint associated with the given Fabric. | |
| static PassiveEndpoint | create (std::shared_ptr< Fabric > fabric, Endpoint::Id id) |
| Allocate a new PassiveEndpoint associated with the given Fabric. | |
Private Member Functions | |
| void | close () |
| Releases all underlying resources. This is called from the destructor and the move-assignment operator. | |
| PassiveEndpoint (::fid_pep *raw, std::shared_ptr< Fabric > fabric, Endpoint::Id id, std::optional< std::shared_ptr< EventQueue > > eq=std::nullopt) | |
| Construct the PassiveEndpoint. | |
Private Attributes | |
| std::optional< std::shared_ptr< EventQueue > > | _eq |
| std::shared_ptr< Fabric > | _fabric |
| Endpoint::Id | _id |
| ::fid_pep * | _raw |
RAII Wrapper around a libfabric passive endpoint (fid_pep).
A passive endpoint can be viewed like a bound TCP socket listening for incoming connections.
Definition at line 20 of file PassiveEndpoint.hpp.
| mxl::lib::fabrics::ofi::PassiveEndpoint::~PassiveEndpoint | ( | ) |
Definition at line 29 of file PassiveEndpoint.cpp.
|
delete |
|
noexcept |
Definition at line 55 of file PassiveEndpoint.cpp.
|
private |
Construct the PassiveEndpoint.
| raw | The raw libfabric fid_pep pointer. |
| fabric | The Fabric the passive endpoint is associated with. |
| eq | Optional event queue associated with the passive endpoint. |
Definition at line 34 of file PassiveEndpoint.cpp.
| void mxl::lib::fabrics::ofi::PassiveEndpoint::bind | ( | std::shared_ptr< EventQueue > | eq | ) |
Bind the endpoint to an event queue.
The endpoint can be bound to an event queue only once. The Endpoint object will take ownership of an instance of the shared pointer, so the queue can not be destroyed before the endpoint.
| eq | The event queue to bind to the endpoint. |
Definition at line 82 of file PassiveEndpoint.cpp.
|
private |
|
staticnodiscard |
Allocate a new PassiveEndpoint associated with the given Fabric.
| fabric | The Fabric to create the PassiveEndpoint on. |
Definition at line 24 of file PassiveEndpoint.cpp.
|
staticnodiscard |
Allocate a new PassiveEndpoint associated with the given Fabric.
| fabric | The Fabric to create the PassiveEndpoint on. |
Definition at line 15 of file PassiveEndpoint.cpp.
|
nodiscard |
Accessor for the associated event queue.
If an event queue is associated with this endpoint. Get the queue. Throws an exception if no event queue is associated with this endpoint.
Definition at line 106 of file PassiveEndpoint.cpp.
|
nodiscardnoexcept |
| void mxl::lib::fabrics::ofi::PassiveEndpoint::listen | ( | ) |
Put the passive endpoint into listening mode.
Definition at line 89 of file PassiveEndpoint.cpp.
|
inlinenodiscard |
Obtain the local fabric address for this passive endpoint.
Definition at line 84 of file PassiveEndpoint.hpp.
| PassiveEndpoint & mxl::lib::fabrics::ofi::PassiveEndpoint::operator= | ( | PassiveEndpoint && | other | ) |
Definition at line 64 of file PassiveEndpoint.cpp.
|
delete |
|
nodiscardnoexcept |
Access the underlying raw fid_pep pointer.
Definition at line 121 of file PassiveEndpoint.cpp.
|
nodiscardnoexcept |
Access the underlying raw fid_pep pointer.
Definition at line 116 of file PassiveEndpoint.cpp.
| void mxl::lib::fabrics::ofi::PassiveEndpoint::reject | ( | Event & | entry | ) |
Reject a connection request event.
| entry | The event entry representing the connection request to reject. |
Definition at line 94 of file PassiveEndpoint.cpp.
|
private |
Event queue lives here after PassiveEndpoint::bind()
Definition at line 117 of file PassiveEndpoint.hpp.
|
private |
Pointer to the fabric for which the passive endpoint was created.
Definition at line 114 of file PassiveEndpoint.hpp.
|
private |
Definition at line 115 of file PassiveEndpoint.hpp.
|
private |
Raw resource reference
Definition at line 113 of file PassiveEndpoint.hpp.