8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WFNetworkTaskFactory的create_client_task函数创建的WFNetworkTask都是请求应答式的短连接吗,如何实现长连接?我试了下tutorial-10也是短连接
The text was updated successfully, but these errors were encountered:
你好,我们tutorial-10的例子是长连接的。
首先,server端的默认连接保持时间是60秒。其次,client侧有一行:
task->set_keep_alive(30 * 1000);
这里吧请求完成之后连接保持时间设置为30秒。如果不调用set_keep_alive(),client任务默认就是短连接。
Sorry, something went wrong.
不过,这个例子确实是请求-应答模式的。你是希望长连接随时互相发消息吗?这个实现起来比较困难,而且有一些限制。内网的话建议在client端也打开一个server,互相请求最简单,可以认为是actor模式。
我们内置的redis subscriber实现了一个长连接通讯,但subscriber是一个客户端,服务端是redis server。
不过,这个例子确实是请求-应答模式的。你是希望长连接随时互相发消息吗?这个实现起来比较困难,而且有一些限制。内网的话建议在client端也打开一个server,互相请求最简单,可以认为是actor模式。 我们内置的redis subscriber实现了一个长连接通讯,但subscriber是一个客户端,服务端是redis server。
好的好的,感谢耐心解答,我最近在学习workflow的代码,我再详细看看用例10,再次感谢!
No branches or pull requests
WFNetworkTaskFactory的create_client_task函数创建的WFNetworkTask都是请求应答式的短连接吗,如何实现长连接?我试了下tutorial-10也是短连接
The text was updated successfully, but these errors were encountered: