#pragma once // 系统配置常量 class Config { public: // 端口配置 static const int HTTP_PORT = 12345; static const int WEBSOCKET_PORT = 12346; // API配置 static constexpr const char* API_PREFIX = "/api"; // 超时配置 static const int HTTP_TIMEOUT_MS = 30000; // 30秒 static const int WEBSOCKET_TIMEOUT_MS = 300000; // 5分钟 static const int SOCKET_RECV_TIMEOUT_MS = 30000; // Socket接收超时30秒 static const int SOCKET_SEND_TIMEOUT_MS = 30000; // Socket发送超时30秒 // 缓冲区大小 static const int BUFFER_SIZE = 4096; // HTTP请求限制 static const int MAX_REQUEST_SIZE = 1048576; // 1MB maximum request size // Creo配置 static const int CREO_CHECK_INTERVAL_MS = 100; // 检查间隔 private: Config() = delete; // 禁止实例化 };