182 void send(
const std::string& message);
Main server application that manages client connections and camera streaming.
Represents a single connected client session.
void run()
Starts the client's session logic.
const irsol::types::socket_t & socket() const
Returns a const reference to the client socket.
const irsol::types::client_id_t & id() const
Returns the unique client identifier.
irsol::types::socket_t m_socket
Socket used for communication with the client.
void handleOutMessages(std::vector< protocol::OutMessage > &&messages)
Handles multiple outbound messages to the client.
std::mutex & socketMutex()
Returns a reference to the socket mutex used for synchronization.
void processInMessageBuffer(std::string &messageBuffer)
Processes accumulated raw data into complete protocol messages.
irsol::types::client_id_t m_id
Unique ID identifying this session (maps to client_id_t).
App & app()
Returns a mutable reference to the owning App instance.
void handleOutMessage(protocol::OutMessage &&message)
Handles a single outbound message to the client.
std::mutex m_socketMutex
Mutex to synchronize socket access from multiple threads.
const App & app() const
Returns a const reference to the owning App instance.
App & m_app
Reference to the central App instance for server-wide coordination.
void processInRawMessage(const std::string &rawMessage)
Parses and processes a complete incoming raw message.
irsol::types::socket_t & socket()
Returns a mutable reference to the client socket.
irsol::server::internal::UserSessionData & userData()
Returns a mutable reference to client-specific session state.
const irsol::server::internal::UserSessionData & userData() const
Returns a const reference to client-specific session state.
void handleSerializedMessage(const protocol::internal::SerializedMessage &serializedMessage)
Sends an already-serialized message to the client.
irsol::server::internal::UserSessionData m_sessionData
Session-specific data (e.g., stream rate, frame subscriptions).
void send(const std::string &message)
Sends a text message over the socket to the client.
std::variant< Success, BinaryDataBuffer, ImageBinaryData, ColorImageBinaryData, Error > OutMessage
Variant type representing any outgoing message.
std::string client_id_t
Represents a unique client identifier. Typically used to identify connected clients by string IDs.
sockpp::tcp_socket socket_t
Alias for a TCP socket.
std::byte byte_t
Alias for a single byte used in serialization or binary data handling.
Defines session-specific internal state structures for connected clients.
Represents a serialized protocol message with header and payload.
Encapsulates all per-client data used during a session's lifetime.
Core type definitions for networking, time handling, and protocol values used throughout the irsol li...