Shows how to use xtd::net::sockets::socket class.
#include <xtd/net/sockets/socket>
#include <xtd/net/ip_end_point>
#include <xtd/threading/thread>
#include <xtd/console>
auto main()->int {
auto terminate_app = false;
while (!terminate_app) {
auto buffer = std::vector<unsigned char>(256);
auto number_of_byte_received = server_socket.receive_from(buffer, incoming_end_point);
if (!(number_of_byte_received == 1 && buffer[0] == 0xFF))
}
}};
auto counter = 0;
while (!terminate_app) {
}
}};
server.start();
client.start();
terminate_app = true;
server.join();
client.join();
}