Files
moloapp/src/cli/ai/socket_transport.hpp
T
retoor 3c4334cec9 feat: implement MoloApp plans 01-15 with integration
Full C++23 framework tree: runtime, observability, security,
data, app, realtime, supervisor, clients, CLI, example plus
enterprise tenancy, audit, operability, governance,
supplychain. Postgres via docker compose for tests.
2026-10-23 18:20:04 +02:00

27 lines
567 B
C++

#pragma once
#include <string>
#include "ai/ai_transport.hpp"
namespace molo::ai {
// Minimal blocking HTTP transport over POSIX sockets. Plain http:// only;
// https:// URLs fail with the marked TLS stub reason.
class SocketAiTransport : public IAiTransport {
public:
AiHttpResponse post_stream(const AiHttpRequest& request) override;
private:
struct ParsedUrl {
std::string host;
int port = 80;
std::string path;
bool https = false;
bool ok = false;
};
static ParsedUrl parse(const std::string& url);
};
} // namespace molo::ai