You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2022/11/20 12:35:16 UTC

[GitHub] [incubator-brpc] chenBright opened a new issue, #2006: baidu协议的rpc write response之后,socket被set failed了,brpc能保证数据发到对端吗?

chenBright opened a new issue, #2006:
URL: https://github.com/apache/incubator-brpc/issues/2006

   了解了一下协议栈的[close逻辑](https://github.com/torvalds/linux/blob/master/net/ipv4/tcp.c#L2904):
   1. 如果接收缓冲区没有数据,则会将fin插入到发送缓冲区最后面,先将数据发送完,再发fin,进行四次挥手。
   2. 如果接收缓冲区还有数据,则直接发送rst,不会进行四次挥手。
   
   对于baidu协议这种支持多发多收的协议,服务端同一连接上的rpc数据都写到内核之后,socket被set failed,很快就close socket fd。如果此时客户端还在不断发请求,服务端的socket很大概率是处于情况2的状态,那么brpc有机制能保证未发送完成的数据发出去之后再进行四次挥手吗?


-- 
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: dev-unsubscribe@brpc.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [I] baidu协议的rpc write response之后,socket被set failed了,brpc能保证数据发到对端吗? (brpc)

Posted by "chenBright (via GitHub)" <gi...@apache.org>.
chenBright closed issue #2006: baidu协议的rpc write response之后,socket被set failed了,brpc能保证数据发到对端吗?
URL: https://github.com/apache/brpc/issues/2006


-- 
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: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org