Newer
Older
// SPDX-License-Identifier: LGPL-3.0-or-later
// Copyright © 2020-2021 Florian Fischer
#include <string> // for string, allocator
#include <vector> // for vector
#include "CountingPrivateSemaphore.hpp" // for CPS
#include "emper.hpp" // for async, spawn
#include "fixtures/network.hpp" // for echo_client, echo_serve
#include "io.hpp" // for tcp_listener
#define MAX 1024
void emperTest() {
std::string port = "4242";
std::string addr = "127.0.0.1";
async(emper::io::tcp_listener(addr, port, echo_serve));
const std::vector<std::string> strings = {"foo", "bar", std::string(MAX, 'a'), "quit\n"};
},
cps);
cps.wait();
}