询问者
一直保持TCP连接,会不会耗流量?会不会耗电?

问题
全部回复
-
会耗费流量,TCP心跳机制,双方保持连接必须发送心跳检测数据包。
费电是必须的,应用跑起来就会消耗电能。
专注于.NET ERP/CRM开发框架,C/S架构,SQL Server + ORM(LLBL Gen Pro) + Infragistics WinForms
- 已编辑 Shuanghua Li 2018年6月1日 0:27
-
你好,
我个人认为第二种更省电一些。 如果使用短连接,可能不到1就能返回,并释放连接。长连接一直保持会更耗电一点,下面的博客,你也可以参考一下。
https://developer.qualcomm.com/blog/hanging-sockets-and-power-consumption-basics-part-3
Best regards,
Zhanglong
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.