|
srs-control 0.2.2
|
Socket class for reading main data stream. More...
#include <DataSocket.hpp>

Public Types | |
| using | ConnectionType = CommandBase |
Public Member Functions | |
| void | cancel () |
| Cancel reading the data from the UDP socket. | |
| 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 Member Functions | |
| void | register_send_action_imp (asio::awaitable< void > action, const std::shared_ptr< ConnectionType > &connection) |
| auto | get_response_msg_buffer () -> std::span< char > |
| void | response_handler (const UDPEndpoint &endpoint, std::size_t read_size) |
| DataSocket (int port_number, io_context_type &io_context, std::size_t buffer_size, workflow::AnalysisHandle &workflow) | |
Static Private Member Functions | |
| static auto | is_finished () -> bool |
| static void | print_error () |
Private Attributes | |
| friend | SpecialSocket |
| std::size_t | buffer_size_ = common::LARGE_READ_MSG_BUFFER_SIZE |
| LargeBuffer | read_msg_buffer_ |
| gsl::not_null< io_context_type * > | io_context_ |
| gsl::not_null< workflow::AnalysisHandle * > | workflow_handler_ |
| BufferQueue::Token | token_ |
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 & |
Socket class for reading main data stream.
Definition at line 22 of file DataSocket.hpp.
Definition at line 25 of file DataSocket.hpp.
|
private |
Definition at line 17 of file DataSocket.cpp.
| void srs::connection::DataSocket::before_socket_close | ( | ) |
Definition at line 51 of file DataSocket.cpp.
| void srs::connection::DataSocket::cancel | ( | ) |
Cancel reading the data from the UDP socket.
Definition at line 44 of file DataSocket.cpp.
|
inlineprivate |
Definition at line 42 of file DataSocket.hpp.
|
inlinestaticprivate |
Definition at line 44 of file DataSocket.hpp.
|
inlinestaticprivate |
Definition at line 45 of file DataSocket.hpp.
|
private |
Definition at line 31 of file DataSocket.cpp.
|
private |
Definition at line 37 of file DataSocket.cpp.
|
private |
Definition at line 35 of file DataSocket.hpp.
|
private |
Definition at line 37 of file DataSocket.hpp.
|
private |
Definition at line 36 of file DataSocket.hpp.
|
private |
Definition at line 34 of file DataSocket.hpp.
|
private |
Definition at line 39 of file DataSocket.hpp.
|
private |
Definition at line 38 of file DataSocket.hpp.