Android如何维护网络连接

发布于 2024-12-05 07:07:54 字数 243 浏览 1 评论 0原文

我想知道Android如何将ppp连接维持在低级别(不是应用程序级别)。

具体来说,当ppp连接失败(无信号或任何原因)时,android如何感知它并尝试重新连接?它会定期测试连接吗?如果是这样,间隔是多少?

我探索了 system/netd 以及 NetworkManagementService.java、ConnectivityService.java 和其他一些相关对象。我还是没能弄清楚其中的原因。

请指教。谢谢,

I want to know how Android maintain the ppp connection at low level (not application level.)

To be specific, when the ppp connection failed (no signal or whatever reason), how did android sense it and try to reconnect? Does it periodically test the connection? if so, what's the interval?

I explored system/netd along with NetworkManagementService.java, ConnectivityService.java and some other related objects. I still couldn't figure the reason out.

Please advise. Thanks,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

郁金香雨 2024-12-12 07:07:54

对我来说,听起来好像您想知道如何在操作系统级别维护网络连接(您确定您的意思是“ PPP”连接?)。

Android本身基于C.在C中编写的Linux,如果您想深入研究网络代码,那么它是免费的,尽管在首先探索PPP协议时可能值得,因为这可能会给您一个“更高级别”维护而不是检查原始代码。

Java代码将是高水平的,并且不会像您的研究发现有关较低级别的工作是否有很多信息。

我不确定在移动/GSM连接上使用了哪些协议,但是我敢肯定,互联网或Wikipedia上的戳戳会揭示事物。

Sounds to me as though you want to know how network connection is maintained at operating system level (and are you sure you mean a 'ppp' connection?).

Android itself is based on Linux which is written in C. If you want to delve into the networking code then it's freely available although it might be worth while exploring the ppp protocol first as this may give you a 'higher level' of how a connection is maintained rather than examining raw code.

The java code will be high level and won't as your research discovered reveal much if anything about the lower level workings.

I'm not sure what protocols are used on mobile/gsm connections but I'm sure a poke around on the internet or Wikipedia will reveal things.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文