|
srs-control 0.2.2
|
#include <FecSwitchSocket.hpp>

Public Types | |
| using | SmallConnection = CommandBase |
| using | ConnectionType = SmallConnection |
| using | US = std::chrono::microseconds |
| using | USCount = decltype(US{}.count()) |
| using | StartEndTime = std::pair<USCount, USCount> |
Public Member Functions | |
| auto | get_strand () -> auto & |
| auto | get_time_us () const -> USCount |
| void | launch_send_actions () |
| void | log_time_stamps (std::string remote_port, AppReport::FecSwitchStat stat) |
| void | before_socket_close () |
| Public Member Functions inherited from srs::connection::SpecialSocket | |
| void | register_send_action (this auto &&self, asio::awaitable< void > action, const std::shared_ptr< typename std::remove_cvref_t< decltype(self)>::ConnectionType > &connection) |
| Registering the send action. | |
| void | listen (this auto &self, io_context_type &io_context) |
| Listen to any UDP data. | |
| auto | cancel_listen_after (this auto &&self, io_context_type &io_context, std::chrono::seconds waiting_time=std::chrono::seconds(2)) -> std::future< void > |
| Cancelling the listening action after a certain time. | |
| auto | wait_for_listen_finish (std::chrono::seconds time) -> std::optional< std::future_status > |
| Blocking the current thread by waiting the listen action to finish until a certain time duration. | |
| void | set_report (AppReport *report) |
| void | before_socket_close () |
| auto | get_socket () const -> udp::socket & |
| Getter for the asio udp socket object. | |
| auto | get_port () const -> int |
| Getter for the port number. | |
| auto | get_future () -> auto & |
| Getter for the status of the listen action. | |
| auto | get_n_records () const -> std::size_t |
| Getter for the number of frames read. | |
| auto | get_n_bytes () const -> std::size_t |
| Getter for the number of bytes read. | |
| auto | get_total_time_ns () const -> std::uint64_t |
| Getter for the total listening time in nano seconds. | |
| auto | get_report () -> auto * |
Private Types | |
| using | SmallConnections = std::vector<std::shared_ptr<SmallConnection>> |
| using | ActionType = decltype(asio::co_spawn(strand_, asio::awaitable<void>(), asio::deferred)) |
Private Member Functions | |
| FecCommandSocket (int port_number, io_context_type &io_context) | |
| void | register_send_action_imp (asio::awaitable< void > action, const std::shared_ptr< SmallConnection > &connection) |
| auto | get_response_msg_buffer () -> std::span< char > |
| auto | is_finished () -> bool |
| void | print_error () const |
| void | response_handler (const UDPEndpoint &endpoint, std::size_t read_size) |
| void | deregister_connection (const UDPEndpoint &endpoint, std::span< char > response, SmallConnections &connections) |
| void | print_available_responses () const |
| void | register_report () |
Private Attributes | |
| friend | SpecialSocket |
| asio::strand< io_context_type::executor_type > | strand_ |
| std::mutex | mut_ |
| std::map< UDPEndpoint, SmallConnections > | all_connections_ |
| std::vector< char > | read_msg_buffer_ |
| std::chrono::time_point< std::chrono::steady_clock > | start_time_ = std::chrono::steady_clock::now() |
| std::vector< std::pair< std::string, AppReport::FecSwitchStat > > | time_stamps_ |
| std::vector< ActionType > | action_queue_ |
Additional Inherited Members | |
| Static Public Member Functions inherited from srs::connection::SpecialSocket | |
| template<SpecialSocketDerived SocketType, typename... Args> | |
| static auto | create (int port_number, io_context_type &io_context, Args &&... args) -> std::expected< std::shared_ptr< SocketType >, std::error_code > |
| Protected Member Functions inherited from srs::connection::SpecialSocket | |
| SpecialSocket (int port_number, io_context_type &io_context) | |
| Projected constructor, which can only be called from the derived classes. | |
| auto | get_cancel_timer () -> auto & |
Definition at line 28 of file FecSwitchSocket.hpp.
|
private |
Definition at line 62 of file FecSwitchSocket.hpp.
Definition at line 32 of file FecSwitchSocket.hpp.
Definition at line 31 of file FecSwitchSocket.hpp.
|
private |
Definition at line 54 of file FecSwitchSocket.hpp.
| using srs::connection::FecCommandSocket::StartEndTime = std::pair<USCount, USCount> |
Definition at line 35 of file FecSwitchSocket.hpp.
| using srs::connection::FecCommandSocket::US = std::chrono::microseconds |
Definition at line 33 of file FecSwitchSocket.hpp.
| using srs::connection::FecCommandSocket::USCount = decltype(US{}.count()) |
Definition at line 34 of file FecSwitchSocket.hpp.
|
explicitprivate |
Definition at line 55 of file FecSwitchSocket.cpp.
|
inline |
Definition at line 50 of file FecSwitchSocket.hpp.
|
private |
Definition at line 95 of file FecSwitchSocket.cpp.
|
inlineprivate |
Definition at line 69 of file FecSwitchSocket.hpp.
|
inline |
Definition at line 38 of file FecSwitchSocket.hpp.
|
inline |
Definition at line 39 of file FecSwitchSocket.hpp.
|
private |
Definition at line 175 of file FecSwitchSocket.cpp.
| void srs::connection::FecCommandSocket::launch_send_actions | ( | ) |
Definition at line 75 of file FecSwitchSocket.cpp.
|
inline |
Definition at line 45 of file FecSwitchSocket.hpp.
|
private |
Definition at line 130 of file FecSwitchSocket.cpp.
|
private |
Definition at line 140 of file FecSwitchSocket.cpp.
|
private |
Definition at line 182 of file FecSwitchSocket.cpp.
|
private |
Definition at line 63 of file FecSwitchSocket.cpp.
|
private |
Definition at line 158 of file FecSwitchSocket.cpp.
|
private |
Definition at line 63 of file FecSwitchSocket.hpp.
|
private |
Definition at line 57 of file FecSwitchSocket.hpp.
|
private |
Definition at line 56 of file FecSwitchSocket.hpp.
|
private |
Definition at line 58 of file FecSwitchSocket.hpp.
|
private |
Definition at line 53 of file FecSwitchSocket.hpp.
|
private |
Definition at line 59 of file FecSwitchSocket.hpp.
|
private |
Definition at line 55 of file FecSwitchSocket.hpp.
|
private |
Definition at line 60 of file FecSwitchSocket.hpp.