How to link HReaders and HWriters over a network link
#include <iostream>
#include <thread>
#include "hardtapi.h"
int main(int argc, char** argv)
{
HInit(std::string("network"), true);
std::cout << "network: using Hardt " + getVersion() << std::endl;
if( argc < 2 )
{
std::cout << "Usage: network 'output-sound-device-number'" << std::endl;
std::cout << "Use 'dspcmd -a' to get a list of your sound device numbers" << std::endl;
return 1;
}
const int BLOCKSIZE = 4096;
bool serverTerminated = false;
std::thread server([&serverProcessor]() {serverProcessor.
Run(); });
bool clientTerminated = false;
clientProcessor.
Run(100);
server.join();
}