void clientProcess(PipeClient<int> &pipe) { int array[100] = {0}; std::vector<int> data; while (!pipe.waitForServer(5000)); pipe.connect(); //std::cout << "Bytes available: " << pipe.bytesAvailable() << std::endl; while (pipe.bytesAvailable() < 400) { std::cout << "Waiting!" << std::endl; } //data = pipe.read(100); std::cout << (data = pipe.read(100)).size()*sizeof(int) << " bytes read!\n"; for (int i : data) std::cout << i << std::endl; }
Transport *TransportFactory::createPipeClientTransport(const TCHAR *name) { PipeClient factory; return new NamedPipeTransport(factory.connect(name)); }