结合Java和nodejs的Andr​​oid应用 [英] Combining java and nodejs for android app

查看:121
本文介绍了结合Java和nodejs的Andr​​oid应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在努力的Andr​​oid游戏,这是基于转,而我选择Nodejs服务器端。我一直在探索了大约两个星期如何从Android客户端传送给Nodejs服务器。有没有办法在两者之间进行通信。

I'm working on Android game which is turn based, and I've chosen Nodejs for the server side. I've been exploring for about two weeks how to communicate from the Android client side to the Nodejs server. Is there any way to communicate between the two.

请帮助我,如果任何一个有这样一个项目的经验。

Kindly help me if any one have any experience with such a project.

推荐答案

有很多这样的事情取决于你的游戏需要为客户机和服务器之间的通信选项。比如查找TCP客户端Android版在这里显示出来像的答案。如果快速更新服务器和客户端之间的重要的话UDP是一种选择,如果你的游戏可以应付在中间部分的数据包的丢失。

There are lots of options for something like this depending on what your game requires for communicating between client and server. For instance looking up "TCP clients for android" here shows up answers like this. If fast updates are important between server and client then UDP is one option, if your game can cope with the loss of some packets in the middle.

除了TCP / UDP你也有像的WebSockets 为Android。

Besides TCP/UDP you also have things like WebSockets for Android.

这篇关于结合Java和nodejs的Andr​​oid应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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