Android客户端和.Net C#服务器之间的最佳沟通策略 [英] Best communication strategy between Android client and .Net C# server

查看:108
本文介绍了Android客户端和.Net C#服务器之间的最佳沟通策略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在探索各种方式,一种是家庭之间实现通讯建立的TCP / IP服务器和Android客户端应用程序。

I was exploring various methods for implementing communication between a home made TCP/IP server and a Android client application.

一些想法: - 对JSON的TCP / IP服务器基地 - 服务与WCF库 - 某种REST服务器

Some ideas: - TCP/IP Server bases on JSON - Service with WCF library - Some sort of REST server

什么是野兽战略和库来解决这个问题?

What is the beast strategy and libraries to approach this problem?

推荐答案

对于简单的消息和状态检查,任何基于HTTP的解决方案将是一个比未来与自己的TCP / IP协议更好的选择。

For simple messaging, and status checks, any HTTP based solution would be a much better choice than coming up with your own TCP/IP protocol.

HTTP流量显著不太可能被防火墙,所以你会避免很多的可访问性和配置问题。

HTTP traffic is significantly less likely to be firewalled, so you will avoid a lot of accessibility and configuration problems.

无论你是否应该使用REST,取决于应用程序的性质。 REST使一个很大的意义 CRUD 的应用程序,但要对其他类型的应用程序少得多的意义。

Whether or not you should use REST, depends on the nature of your application. REST makes a lot of sense for CRUD applications, but make much less sense for other types of applications.

这篇关于Android客户端和.Net C#服务器之间的最佳沟通策略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆