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/12/21 03:50:32 UTC

[GitHub] [incubator-brpc] yongxiangzheng opened a new issue, #2051: 应用层如何感知连接的断开和重连

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

   目前有需求,在客户端连接成功服务端后,主动推送客户端一些基本信息到服务端,所以需要应用层能感知建立连接或者重连事件通知,我看日志输出,断开和重连都会打印,跟踪了代码,并没有对应用层抛出事件通知,请问应用层如何去感知连接状态呢?
   ![image](https://user-images.githubusercontent.com/8653159/208817102-4dc18d5b-55df-43bd-81c7-b95b31fb4024.png)
   
   


-- 
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


[GitHub] [brpc] cdjingit commented on issue #2051: 应用层如何感知连接的断开和重连

Posted by "cdjingit (via GitHub)" <gi...@apache.org>.
cdjingit commented on issue #2051:
URL: https://github.com/apache/brpc/issues/2051#issuecomment-1407934164

   可以试下上面的方法,先关闭这个issue


-- 
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: devnull-unsubscribe@infra.apache.org

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


[GitHub] [brpc] cdjingit closed issue #2051: 应用层如何感知连接的断开和重连

Posted by "cdjingit (via GitHub)" <gi...@apache.org>.
cdjingit closed issue #2051: 应用层如何感知连接的断开和重连
URL: https://github.com/apache/brpc/issues/2051


-- 
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: devnull-unsubscribe@infra.apache.org

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


[GitHub] [incubator-brpc] cdjingit commented on issue #2051: 应用层如何感知连接的断开和重连

Posted by GitBox <gi...@apache.org>.
cdjingit commented on issue #2051:
URL: https://github.com/apache/incubator-brpc/issues/2051#issuecomment-1364961953

   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

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


[GitHub] [incubator-brpc] TousakaRin commented on issue #2051: 应用层如何感知连接的断开和重连

Posted by GitBox <gi...@apache.org>.
TousakaRin commented on issue #2051:
URL: https://github.com/apache/incubator-brpc/issues/2051#issuecomment-1375042065

   @yongxiangzheng  还有一个比较tricky的方法,把你的要推送的信息作为Authentication信息,brpc在连接建立之后,第一个message会带上Authentication信息,服务端会调用VerifyCredential去验证,这个方法可以在连接建立的时候插入回调。接口在[这里](https://github.com/apache/incubator-brpc/blob/60159fc3f3e13490fb9806ea0a0cb0dcdbda7f7d/src/brpc/authenticator.h),继承这个类之后,将对象插入到channel和server的options里。


-- 
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


[GitHub] [incubator-brpc] yongxiangzheng commented on issue #2051: 应用层如何感知连接的断开和重连

Posted by GitBox <gi...@apache.org>.
yongxiangzheng commented on issue #2051:
URL: https://github.com/apache/incubator-brpc/issues/2051#issuecomment-1364977475

   现在采用定时调用checkhealth接口,进行判断连接状态,觉得这样做能感知连接状态,但是实时性不强,以及开启定时器会有一些额外性能开销。底层是为什么做这个屏蔽,是因为rpc调用规则吗


-- 
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