Channel()Default constructor.
API · fair::mq
Wrapper class for Socket and related methods.
The class is not thread-safe.
Channel()Default constructor.
Channel(const std::string& name)Constructor
nameChannel(
const std::string& type,
const std::string& method,
const std::string& address
)Constructor
Channel(
const std::string& name,
const std::string& type,
std::shared_ptr<TransportFactory> factory
)Constructor
nametypefactoryChannel(
std::string name,
std::string type,
std::string method,
std::string address,
std::shared_ptr<TransportFactory> factory
)Constructor
nametypemethodaddressfactoryChannel(const std::string& name, int index, const Properties& properties)No comment in the header yet.
Channel(const Channel&)Copy Constructor.
Channel(const Channel&, std::string name)Copy Constructor (with new name)
Channel(Channel&&) = defaultMove constructor.
Channel& operator=(const Channel&)Assignment operator.
Channel& operator=(Channel&&) = defaultMove assignment operator.
~Channel() = defaultDestructor.
Socket& GetSocket() constNo comment in the header yet.
bool Bind(const std::string& address)No comment in the header yet.
bool Connect(const std::string& address)No comment in the header yet.
std::string GetName() constGet channel name
std::string GetPrefix() constGet channel prefix
std::string GetIndex() constGet channel index
std::string GetType() constGet socket type
std::string GetMethod() constGet socket method
std::string GetAddress() constGet socket address (e.g. "tcp://127.0.0.1:5555" or "ipc://abc")
std::string GetTransportName() constGet channel transport name ("default", "zeromq" or "shmem")
mq::Transport GetTransportType() constGet channel transport type
int GetSndBufSize() constGet socket send buffer size (in number of messages)
int GetRcvBufSize() constGet socket receive buffer size (in number of messages)
int GetSndKernelSize() constGet socket kernel transmit send buffer size (in bytes)
int GetRcvKernelSize() constGet socket kernel transmit receive buffer size (in bytes)
int GetSndTimeout() constGet socket default send timeout (in ms)
int GetRcvTimeout() constGet socket default receive timeout (in ms)
int GetLinger() constGet linger duration (in milliseconds)
int GetRateLogging() constGet socket rate logging interval (in seconds)
int GetPortRangeMin() constGet start of the port range for automatic binding
int GetPortRangeMax() constGet end of the port range for automatic binding
bool GetAutoBind() constSet automatic binding (pick random port if bind fails)
auto GetNumberOfConnectedPeers() constvoid UpdateName(const std::string& name)Set channel name
namevoid UpdateType(const std::string& type)Set socket type
typevoid UpdateMethod(const std::string& method)Set socket method
methodvoid UpdateAddress(const std::string& address)Set socket address
Socketvoid UpdateTransport(const std::string& transport)Set channel transport
transportvoid UpdateSndBufSize(int sndBufSize)Set socket send buffer size
sndBufSizevoid UpdateRcvBufSize(int rcvBufSize)Set socket receive buffer size
rcvBufSizevoid UpdateSndKernelSize(int sndKernelSize)Set socket kernel transmit send buffer size (in bytes)
sndKernelSizevoid UpdateRcvKernelSize(int rcvKernelSize)Set socket kernel transmit receive buffer size (in bytes)
rcvKernelSizevoid UpdateSndTimeout(int sndTimeoutMs)Set socket default send timeout (in ms)
sndTimeoutMsvoid UpdateRcvTimeout(int rcvTimeoutMs)Set socket default receive timeout (in ms)
rcvTimeoutMsvoid UpdateLinger(int duration)Set linger duration (in milliseconds)
durationvoid UpdateRateLogging(int rateLogging)Set socket rate logging interval (in seconds)
rateLoggingvoid UpdatePortRangeMin(int minPort)Set start of the port range for automatic binding
minPortvoid UpdatePortRangeMax(int maxPort)Set end of the port range for automatic binding
maxPortvoid UpdateAutoBind(bool autobind)Set automatic binding (pick random port if bind fails)
autobindbool IsValid() constChecks if the configured channel settings are valid (checks the validity parameter, without running full validation (as oposed to ValidateChannel()))
bool Validate()Validates channel configuration
void Init()No comment in the header yet.
bool ConnectEndpoint(const std::string& endpoint)No comment in the header yet.
bool BindEndpoint(std::string& endpoint)No comment in the header yet.
void Invalidate()invalidates the channel (requires validation to be used again).
template<typename M, typename... Timeout>
std::enable_if_t<is_transferrable<M>::value, int64_t> Send(
M& m,
Timeout&&... sndTimeoutMs
)Send message(s) to the socket queue.
msndTimeoutMstemplate<typename M, typename... Timeout>
std::enable_if_t<is_transferrable<M>::value, int64_t> Receive(
M& m,
Timeout&&... rcvTimeoutMs
)Receive message(s) from the socket queue.
mrcvTimeoutMsunsigned long GetBytesTx() constNo comment in the header yet.
unsigned long GetBytesRx() constNo comment in the header yet.
unsigned long GetMessagesTx() constNo comment in the header yet.
unsigned long GetMessagesRx() constNo comment in the header yet.
auto Transport() -> TransportFactory *No comment in the header yet.
template<typename... Args>
MessagePtr NewMessage(Args&&... args)No comment in the header yet.
template<typename T>
MessagePtr NewSimpleMessage(const T& data)No comment in the header yet.
template<typename T>
MessagePtr NewStaticMessage(const T& data)No comment in the header yet.
template<typename... Args>
UnmanagedRegionPtr NewUnmanagedRegion(Args&&... args)No comment in the header yet.
static constexpr mq::Transport DefaultTransportType = mq::Transport::DEFAULTNo comment in the header yet.
static constexpr const char* DefaultTransportName = "default"No comment in the header yet.
static constexpr const char* DefaultName = ""No comment in the header yet.
static constexpr const char* DefaultType = "unspecified"No comment in the header yet.
static constexpr const char* DefaultMethod = "unspecified"No comment in the header yet.
static constexpr const char* DefaultAddress = "unspecified"No comment in the header yet.
static constexpr int DefaultSndBufSize = 1000No comment in the header yet.
static constexpr int DefaultRcvBufSize = 1000No comment in the header yet.
static constexpr int DefaultSndKernelSize = 0No comment in the header yet.
static constexpr int DefaultRcvKernelSize = 0No comment in the header yet.
static constexpr int DefaultSndTimeoutMs = -1No comment in the header yet.
static constexpr int DefaultRcvTimeoutMs = -1No comment in the header yet.
static constexpr int DefaultLinger = 500No comment in the header yet.
static constexpr int DefaultRateLogging = 1No comment in the header yet.
static constexpr int DefaultPortRangeMin = 22000No comment in the header yet.
static constexpr int DefaultPortRangeMax = 23000No comment in the header yet.
static constexpr bool DefaultAutoBind = trueNo comment in the header yet.
friend std::ostream& operator<<(std::ostream& os, const Channel& ch)No comment in the header yet.