SCRIPT namespace replacements

This commit is contained in:
PJ Reiniger
2025-11-07 20:00:05 -05:00
committed by Peter Johnson
parent ae6c043632
commit 9aca8e0fd6
2622 changed files with 22275 additions and 22275 deletions

View File

@@ -10,7 +10,7 @@
#include "wpi/util/Logger.hpp"
#include "wpi/util/print.hpp"
namespace uv = wpi::uv;
namespace uv = wpi::net::uv;
static void logfunc(unsigned int level, const char* file, unsigned int line,
const char* msg) {
@@ -18,15 +18,15 @@ static void logfunc(unsigned int level, const char* file, unsigned int line,
}
int main() {
wpi::Logger logger{logfunc, 0};
wpi::util::Logger logger{logfunc, 0};
// Kick off the event loop on a separate thread
wpi::EventLoopRunner loop;
std::shared_ptr<wpi::DsClient> client;
wpi::net::EventLoopRunner loop;
std::shared_ptr<wpi::net::DsClient> client;
loop.ExecAsync([&](uv::Loop& loop) {
client = wpi::DsClient::Create(loop, logger);
client = wpi::net::DsClient::Create(loop, logger);
client->setIp.connect(
[](std::string_view ip) { wpi::print("got IP: {}\n", ip); });
[](std::string_view ip) { wpi::util::print("got IP: {}\n", ip); });
client->clearIp.connect([] { std::fputs("cleared IP\n", stdout); });
});