diff --git a/example-host-config.toml b/example-host-config.toml index e69de29..a7ace8a 100644 --- a/example-host-config.toml +++ b/example-host-config.toml @@ -0,0 +1,2 @@ +[hostname] +base_path="https://tracker.example.com" diff --git a/src/shared-utils/objects.cpp b/src/shared-utils/objects.cpp new file mode 100644 index 0000000..b4b8237 --- /dev/null +++ b/src/shared-utils/objects.cpp @@ -0,0 +1,8 @@ +#include "objects.hpp" + +namespace serializable { + template + void serialize(S &s, HandshakeConnection &object){ + s.value2b(object.payload); + } +} diff --git a/src/shared-utils/objects.hpp b/src/shared-utils/objects.hpp new file mode 100644 index 0000000..9a1b0bf --- /dev/null +++ b/src/shared-utils/objects.hpp @@ -0,0 +1,13 @@ +#pragma once +#include +#include + +namespace serializable{ + +struct HandshakeConnection { + std::uint16_t payload; + }; + + template + void serialize(S& s, HandshakeConnection& object); +}