#include <xtd/io/stream_reader>
#include <xtd/io/stream_writer>
#include <xtd/net/sockets/socket>
#include <xtd/net/sockets/network_stream>
#include <xtd/net/ip_end_point>
#include <xtd/threading/thread>
#include <xtd/console>
auto main() -> int {
auto terminate_app = false;
server_socket.listen();
while (!terminate_app)
}};
server.start();
auto counter = 0;
while (!terminate_app) {
thread::sleep(50_ms);
}
}};
client.start();
terminate_app = true;
server.join();
client.join();
}
static console_key_info read_key()
Obtains the next character or function key pressed by the user. The pressed key is displayed in the c...
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
Implements a xtd::io::text_reader that reads characters from a byte stream.
Definition stream_reader.hpp:28
Implements a xtd::io::text_writer for writing characters to a stream.
Definition stream_writer.hpp:28
static const ip_address any
Provides an IP address that indicates that the server must listen for client activity on all network ...
Definition ip_address.hpp:44
static const ip_address loopback
Provides the IP loopback address. This field is constant.
Definition ip_address.hpp:60
Represents a network endpoint as an IP address and a port number.
Definition ip_end_point.hpp:23
Implements the Berkeley sockets interface.
Definition socket.hpp:74
Creates and controls a thread, sets its priority, and gets its status.
Definition thread.hpp:43
@ inter_network
Address for IP version 4.
@ tcp
Transmission Control Protocol.
@ stream
Supports reliable, two-way, connection-based byte streams without the duplication of data and without...
The xtd::io namespace contains types that allow reading and writing to files and data streams,...
Definition binary_reader.hpp:16
The xtd::net::sockets namespace provides a managed implementation of the Berkeley Sockets interface f...
Definition address_family.hpp:16
The xtd::net namespace provides a simple programming interface for many of the protocols used on netw...
Definition cookie_exception.hpp:11
The xtd::threading namespace provides classes and interfaces that enable multithreaded programming....
Definition abandoned_mutex_exception.hpp:11
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10