1 #ifndef jb_itch5_mold_udp_channel_hpp 2 #define jb_itch5_mold_udp_channel_hpp 4 #include <boost/asio/io_service.hpp> 5 #include <boost/asio/ip/udp.hpp> 13 class udp_receiver_config;
39 typedef std::function<void(
41 char const*, std::size_t)>
90 handle_received(boost::system::error_code
const& ec,
size_t bytes_received);
110 static std::size_t
const buflen = 1 << 16;
123 #endif // jb_itch5_mold_udp_channel_hpp std::size_t message_offset_
mold_udp_channel(boost::asio::io_service &io, buffer_handler const &handler, udp_receiver_config const &cfg)
Constructor, create a socket and register for IO notifications.
clock_type::time_point time_point
A convenience alias for clock_type::time_point.
static std::size_t const buflen
std::function< void(std::chrono::steady_clock::time_point, std::uint64_t, std::size_t, char const *, std::size_t)> buffer_handler
A callback function type to process any received ITCH-5.0 messages.
void handle_received(boost::system::error_code const &ec, size_t bytes_received)
The Boost.ASIO callback for I/O events.
void restart_async_receive_from()
Refactor code to register (and reregister) for Boost.ASIO notifications.
Break encapsulation in jb::itch5::mold_udp_channel for testing purposes.
std::uint64_t expected_sequence_number_
boost::asio::ip::udp::endpoint sender_endpoint_
boost::asio::ip::udp::socket socket_
A configuration object for UDP receivers.
Create and manage a socket to receive MoldUDP64 packets.
The top-level namespace for the JayBeams library.