|
OSSIA
Open Scenario System for Interactive Application
|
Inherits Nano::Observer.
Owns the transport and every asio-side callback.
The Nano::Observer is here rather than on the QObject on purpose: the signals it listens to live in socket, a member of this very object, so the (unsynchronized) slot lists can only be mutated while the whole state is being destroyed, at which point no handler can still be running. The QObject, which is destroyed on the Qt thread while the asio thread may be firing, is only ever reached under qt_mutex.
Public Attributes | |
| ossia::net::tcp_client | socket |
| std::atomic_bool | alive {true} |
| std::atomic_bool | closed {false} |
| ossia::net::framing | framing {ossia::net::framing::none} |
| ossia::net::encoding | enc {ossia::net::encoding::none} |
| char | line_delimiter [8] = {} |
| decoder_type | decoder |
| std::mutex | qt_mutex |
| qml_tcp_outbound_socket * | self {} |
| std::mutex ossia::qt::qml_tcp_outbound_socket::state::qt_mutex |
Guards self, which is cleared before the QObject starts dying. Held for the whole asio -> Qt handover, so the QObject cannot be destroyed in the middle of one.