1 Star 0 Fork 0

姚益祁/process_protocol

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
test.cpp 550 Bytes
一键复制 编辑 原始数据 按行查看 历史
#include "process_protocol.h"
int main(int argc, char const *argv[])
{
procProtocol protocol;
try
{
protocol.init("/tmp/FIFO1", "/tmp/FIFO2"); // argument 1 to write, 2 to read
int cnt = 0;
while(cnt < 10)
{ // Here is the easiest way to use procProtocol
protocol.writePipe("Hello");
std::cout << protocol.readPipe() << std::endl;
cnt++;
}
}
catch(const protocolException& e)
{
std::cerr << e.what() << std::endl;
}
return 0;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Ya_Qia/process_protocol.git
git@gitee.com:Ya_Qia/process_protocol.git
Ya_Qia
process_protocol
process_protocol
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385