Network System 0.1.1
High-performance modular networking library for scalable client-server applications
Loading...
Searching...
No Matches
legacy_client_example.cpp File Reference

Example showing legacy (deprecated) client interface usage. More...

#include <cstdint>
#include <functional>
#include <iostream>
#include <memory>
#include <string_view>
#include <system_error>
#include <vector>
Include dependency graph for legacy_client_example.cpp:

Go to the source code of this file.

Classes

class  legacy_example::i_client
 

Namespaces

namespace  legacy_example
 

Functions

void legacy_example::setup_legacy_client (std::unique_ptr< i_client > client)
 Legacy client setup example.
 
int main ()
 

Detailed Description

Example showing legacy (deprecated) client interface usage.

This file demonstrates the OLD way of creating network clients. It is provided for reference only - new code should use the unified API.

See also
unified_client_example.cpp for the new, recommended approach

Definition in file legacy_client_example.cpp.

Function Documentation

◆ main()

int main ( )

Definition at line 105 of file legacy_client_example.cpp.

105 {
106 std::cout << "=== Legacy Client Example ===\n";
107 std::cout << "This file demonstrates the DEPRECATED legacy API.\n";
108 std::cout << "See unified_client_example.cpp for the new approach.\n\n";
109
110 std::cout << "Legacy issues:\n";
111 std::cout << " 1. Multiple protocol-specific interfaces to learn\n";
112 std::cout << " 2. Verbose individual callback setters\n";
113 std::cout << " 3. Protocol-coupled code\n";
114 std::cout << " 4. std::vector<uint8_t> instead of std::span<std::byte>\n";
115
116 return 0;
117}