thorneliu opened a new pull request, #2375:
URL: https://github.com/apache/brpc/pull/2375

   ### What problem does this PR solve?
   
   Issue Number:
   NA
   
   Problem Summary:
   添加了使用brpc 实现HTTP SSE功能的例子,便于brpc用于大语言模型推理服务化
   
   ### What is changed and the side effects?
   
   Changed:
   在example/http_c++中添加了一个HttpSSEServiceImpl实现。
   具体而言,SSE要求server端
   1. 发送包含如下头部信息的HTTP response
   ```
   Content-Type: text/event-stream
   Cache-Control: no-cache
   Connection: keep-alive
   ```
   2. 后续HTTP server基于`ProgressiveAttachment`向客户段发送SSE的消息格式
   ```
   [field]: value\n
   ```
   其中, field可以取四个值,它们分别是:data、event、id、retry
   Side effects:
   - Performance effects(性能影响):
   NO impact
   - Breaking backward compatibility(向后兼容性): 
   NO compatibiltiy issue
   ---
   ### Check List:
   - Please make sure your changes are compilable(请确保你的更改可以通过编译).
   - When providing us with a new feature, it is best to add related 
tests(如果你向我们增加一个新的功能, 请添加相关测试).
   - Please follow [Contributor Covenant Code of 
Conduct](../../master/CODE_OF_CONDUCT.md).(请遵循贡献者准则).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to