working commit

This commit is contained in:
2026-04-22 18:15:05 +02:00
parent f1b7d9783d
commit 76c797b489
13 changed files with 207 additions and 135 deletions
+8 -12
View File
@@ -8,19 +8,15 @@
int main(int argc, char** argv) {
UDPClient cli;
std::string message("Hello");
{
auto res = cli.Bind("www.gnu.org", 1025);
if (!res) {
std::cerr << std::format("Error: {}", res.error()) << std::endl;
return 1;
}
auto bindRes = cli.Bind("www.gnu.org", 1025);
if (!bindRes) {
std::cerr << std::format("Error: {}", bindRes.error()) << std::endl;
return 1;
}
{
auto res = cli.Send(message);
if (!res) {
std::cerr << std::format("Error: {}", res.error()) << std::endl;
return 1;
}
auto sendRes = cli.Send(message);
if (!sendRes) {
std::cerr << std::format("Error: {}", sendRes.error()) << std::endl;
return 1;
}
return 0;
}