gpt4 book ai didi

java - Streaming API的策略

转载 作者:行者123 更新时间:2023-12-01 15:11:10 24 4
gpt4 key购买 nike

https://dev.twitter.com/docs/streaming-apis

An app which connects to the Streaming APIs will not be able to establish a connection in response to a user request, as shown in the above example. Instead, the code for maintaining the Streaming connection is typically run in a process separate from the process which handles HTTP requests

正如上面所说的流式API而不是传统的API,有一个API用于维护流式连接,如何做到这一点?我们知道http是无状态的,只有浏览器发出请求,服务器才能响应,它如何保持连接呢?是客户端不断发送请求,还是html5中的socket,或者这个问题与http无关,只是c/s的问题?

最佳答案

我认为这不是http的问题,它将是在http下运行的东西,比如c/s

关于java - Streaming API的策略,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12341954/

24 4 0