support non-local remote transports (#57)

* support non-local remote transports

* fix LogosResult

* allow getting client over specific transport

* fix ssl

* investiage ssl error

* pr comments

* allow transport set configuration on any module

* pr comments

* add docs

* pr comments

* propagate only non-qt dependencies

* restore ABI compatibility
This commit is contained in:
Dario Lipicar
2026-05-07 12:27:14 -03:00
committed by GitHub
parent ecd369d48b
commit 25c88f4d48
57 changed files with 4960 additions and 114 deletions
+27
View File
@@ -0,0 +1,27 @@
#include "cbor_codec.h"
#include "json_mapping.h"
#include <nlohmann/json.hpp>
namespace logos::plain {
using json = nlohmann::json;
std::vector<uint8_t> CborCodec::encode(const AnyMessage& msg)
{
const json j = messageToJson(msg);
return json::to_cbor(j);
}
AnyMessage CborCodec::decode(MessageType tag, const uint8_t* data, std::size_t len)
{
json j;
try {
j = json::from_cbor(data, data + len, /*strict=*/true, /*allow_exceptions=*/true);
} catch (const std::exception& e) {
throw CodecError(std::string("cbor parse failed: ") + e.what());
}
return jsonToMessage(tag, j);
}
} // namespace logos::plain