Home
libucxx
libucxx
ucxx
nightly (0.53)
nightly (0.53)
stable (0.52)
legacy (0.51)
Toggle main menu visibility
Loading...
Searching...
No Matches
include
ucxx
endpoint_builder.h
1
5
#pragma once
6
7
#include <cstdint>
8
#include <memory>
9
#include <string>
10
#include <utility>
11
12
#include <ucp/api/ucp.h>
13
14
namespace
ucxx
{
15
16
class
Address
;
17
class
Endpoint
;
18
class
Listener
;
19
class
Worker
;
20
28
class
EndpointBuilder
final {
29
public
:
37
EndpointBuilder
(std::shared_ptr<Worker> worker, std::string ipAddress, uint16_t port);
38
45
EndpointBuilder
(std::shared_ptr<Listener> listener, ucp_conn_request_h connRequest);
46
53
EndpointBuilder
(std::shared_ptr<Worker> worker, std::shared_ptr<Address> address);
54
56
~EndpointBuilder
();
57
59
EndpointBuilder
(
const
EndpointBuilder
& other);
61
EndpointBuilder
&
operator=
(
const
EndpointBuilder
& other);
63
EndpointBuilder
(
EndpointBuilder
&&) noexcept;
65
EndpointBuilder
& operator=(
EndpointBuilder
&&) noexcept;
66
72
operator std::shared_ptr<
Endpoint
>();
73
80
EndpointBuilder
&
endpointErrorHandling
(
bool
enable = true);
81
89
[[nodiscard]] std::shared_ptr<
Endpoint
>
build
();
90
91
private:
92
struct Impl;
93
std::unique_ptr<Impl> _impl;
94
};
95
104
[[nodiscard]] inline
EndpointBuilder
endpointBuilder
(std::shared_ptr<
Worker
> worker,
105
std::
string
ipAddress,
106
uint16_t port)
107
{
108
return
EndpointBuilder
(std::move(worker), std::move(ipAddress), port);
109
}
110
118
[[nodiscard]]
inline
EndpointBuilder
endpointBuilder
(std::shared_ptr<Listener> listener,
119
ucp_conn_request_h connRequest)
120
{
121
return
EndpointBuilder
(std::move(listener), connRequest);
122
}
123
131
[[nodiscard]]
inline
EndpointBuilder
endpointBuilder
(std::shared_ptr<Worker> worker,
132
std::shared_ptr<Address> address)
133
{
134
return
EndpointBuilder
(std::move(worker), std::move(address));
135
}
136
137
}
// namespace ucxx
ucxx::Address
Component encapsulating the address of a UCP worker.
Definition
address.h:26
ucxx::EndpointBuilder
Builder class for constructing std::shared_ptr<ucxx::Endpoint> objects.
Definition
endpoint_builder.h:28
ucxx::EndpointBuilder::operator=
EndpointBuilder & operator=(const EndpointBuilder &other)
Copy assignment operator (deep-copies internal state).
ucxx::EndpointBuilder::endpointErrorHandling
EndpointBuilder & endpointErrorHandling(bool enable=true)
Configure endpoint error handling.
ucxx::EndpointBuilder::EndpointBuilder
EndpointBuilder(std::shared_ptr< Worker > worker, std::shared_ptr< Address > address)
Constructor for EndpointBuilder from a worker address.
ucxx::EndpointBuilder::EndpointBuilder
EndpointBuilder(std::shared_ptr< Worker > worker, std::string ipAddress, uint16_t port)
Constructor for EndpointBuilder from hostname and port.
ucxx::EndpointBuilder::EndpointBuilder
EndpointBuilder(EndpointBuilder &&) noexcept
Move constructor.
ucxx::EndpointBuilder::EndpointBuilder
EndpointBuilder(const EndpointBuilder &other)
Copy constructor (deep-copies internal state).
ucxx::EndpointBuilder::~EndpointBuilder
~EndpointBuilder()
EndpointBuilder destructor.
ucxx::EndpointBuilder::build
std::shared_ptr< Endpoint > build()
Build and return the Endpoint.
ucxx::EndpointBuilder::EndpointBuilder
EndpointBuilder(std::shared_ptr< Listener > listener, ucp_conn_request_h connRequest)
Constructor for EndpointBuilder from a connection request.
ucxx::Endpoint
Component encapsulating a UCP endpoint.
Definition
endpoint.h:69
ucxx::Listener
Component encapsulating a UCP listener.
Definition
listener.h:26
ucxx::Worker
Component encapsulating a UCP worker.
Definition
worker.h:62
ucxx
Definition
address.h:16
ucxx::endpointBuilder
EndpointBuilder endpointBuilder(std::shared_ptr< Worker > worker, std::string ipAddress, uint16_t port)
Create an EndpointBuilder from hostname and port.
Definition
endpoint_builder.h:104
Generated by
1.18.0