exchange
Low-latency exchange in C++
Loading...
Searching...
No Matches
action_spmc_receiver.hpp
Go to the documentation of this file.
1
#pragma once
2
#include "
shared_memory.hpp
"
3
#include "
server/common/model/action/action.hpp
"
4
5
#include <type_traits>
6
extern
"C"
7
{
8
#include "concurrent/aeron_broadcast_receiver.h"
9
}
10
11
namespace
exchange::server
12
{
13
14
class
ActionSpmcReceiver
15
{
16
aeron_broadcast_receiver_t receiver;
17
18
static
void
onAction(std::int32_t msgTypeId, uint8_t *data, std::size_t length,
void
*clientd)
noexcept
;
19
20
public
:
21
ActionSpmcReceiver
(
SharedMemory
&sharedMemory);
22
ActionSpmcReceiver
(
const
ActionSpmcReceiver
&) =
delete
;
23
ActionSpmcReceiver
&
operator=
(
const
ActionSpmcReceiver
&) =
delete
;
24
ActionSpmcReceiver
(
ActionSpmcReceiver
&&other)
noexcept
;
25
ActionSpmcReceiver
&
operator=
(
ActionSpmcReceiver
&&other)
noexcept
;
26
~ActionSpmcReceiver
();
27
33
[[nodiscard]]
Action
receive
() noexcept;
34
};
35
36
}
// namespace exchange::server
action.hpp
exchange::server::ActionSpmcReceiver::ActionSpmcReceiver
ActionSpmcReceiver(const ActionSpmcReceiver &)=delete
exchange::server::ActionSpmcReceiver::~ActionSpmcReceiver
~ActionSpmcReceiver()
Definition
action_spmc_receiver.cpp:28
exchange::server::ActionSpmcReceiver::operator=
ActionSpmcReceiver & operator=(const ActionSpmcReceiver &)=delete
exchange::server::ActionSpmcReceiver::ActionSpmcReceiver
ActionSpmcReceiver(SharedMemory &sharedMemory)
Definition
action_spmc_receiver.cpp:9
exchange::server::ActionSpmcReceiver::receive
Action receive() noexcept
Definition
action_spmc_receiver.cpp:39
exchange::server::SharedMemory
Definition
shared_memory.hpp:15
exchange::server
Definition
main.hpp:4
shared_memory.hpp
exchange::server::Action
Definition
action.hpp:17
server
common
include
server
common
collections
ipc
action_spmc_receiver.hpp
Generated by
1.15.0