IRSOL
C++ code implementing socket server for interacting with Baumer camera.
base.cpp
Go to the documentation of this file.
2
4
5namespace irsol {
6namespace server {
7namespace handlers {
8std::shared_ptr<irsol::server::ClientSession>
13
14void
17 const std::optional<irsol::types::client_id_t>& excludeClient)
18{
19 return app.broadcastMessage(std::move(message), excludeClient);
20}
21} // namespace handlers
22} // namespace server
23} // namespace irsol
Main server application managing client connections and camera streaming.
Base handler templates for protocol message processing.
std::shared_ptr< ClientSession > getClientSession(const irsol::types::client_id_t &clientId)
Retrieves an active client session.
Definition app.cpp:53
void broadcastMessage(protocol::OutMessage &&message, const std::optional< irsol::types::client_id_t > &excludeClient=std::nullopt)
Broadcasts a message to all connected clients.
Definition app.cpp:61
std::variant< Success, BinaryDataBuffer, ImageBinaryData, ColorImageBinaryData, Error > OutMessage
Variant type representing any outgoing message.
Definition variants.hpp:149
constexpr auto makeHandler(std::shared_ptr< Context > ctx, Args &&... args)
Constructs a handler instance of the given type.
Definition factory.hpp:28
std::string client_id_t
Represents a unique client identifier. Typically used to identify connected clients by string IDs.
Definition types.hpp:55
void broadcastMessage(protocol::OutMessage &&message, const std::optional< irsol::types::client_id_t > &excludeClient=std::nullopt)
Broadcasts a message to all clients.
Definition base.cpp:15
virtual std::shared_ptr< irsol::server::ClientSession > getSession(const irsol::types::client_id_t &clientId)
Retrieves the client's session associated with the given clientId.
Definition base.cpp:9
App & app
Reference to application instance.
Definition context.hpp:38