Sync from GitHub main #1

Open
nomad wants to merge 145 commits from sync/from-github into main
Showing only changes of commit 6861fa4276 - Show all commits
@@ -6,6 +6,7 @@
#include <cassert>
#include <chrono>
#include <cstdint>
#include <cstdio>
#include <optional>
#include <string>
#include <thread>
@@ -129,7 +130,11 @@ int main()
{
co_gns_server_handle server = nullptr;
std::array<char, 256> error{};
assert(co_gns_server_create("127.0.0.1", 0, &server, error.data(), error.size()) == 1);
const int createResult = co_gns_server_create("127.0.0.1", 0, &server, error.data(), error.size());
if (createResult != 1) {
std::fprintf(stderr, "co_gns_server_create failed (rc=%d): %s\n", createResult, error.data());
}
assert(createResult == 1);
assert(server != nullptr);
const auto port = co_gns_server_local_port(server);
assert(port != 0);