Server Side
Connection Established
The classes sf::Variable and sf::ResultData are not multi-thread safe and can only run in the main thread. Relaying threads to the main thread is thus required.
- A sf::ServerConnection instance is created by the listening sf::SocketServer instance and thread.
- The sf::ServerConnection has a member sf::ServerConnector which collects all exported generic information instances (sf::Variable and sf::ResultData).
- A instance of sf::VariableCollector is created for collecting sf::Variable and capturing its events. Variables are collected by the export flag set in the instance.
- All sf::Variable instances are hooked to a handler for events.
- Variable event information as setup string, value and flags is are stored into a multi-thread safe fifo and a thread is triggered to process.
- The socket processing thread is notified that the fifo has been filled