Java可靠的UDP

标签 java udp client-server

请推荐实现可靠 udp 的 java 库。它将用于游戏服务器与客户端和其他服务器进行通信。

附言:也许您可以建议可以更高效地处理此类任务(游戏服务器)的技术?但这必须在 Linux 上工作。

编辑:这是一款 Action 类游戏,因此需要尽快与服务器通信。

编辑 2: 我找到了 Enet这是用于FPS游戏的,但它是C++,如果我一秒钟调用它多次,会不会有开销?

最佳答案

这些是我所知道的实现可靠 UDP 之类的库/框架:

MR-UDP aims at providing reliable communication based on UDP from/to mobile nodes (MNs), with least possible overhead. It extends a Reliable UDP (R-UDP) protocol with mobility-tolerating features, such as the ability to handle intermit-tent connectivity, Firewall/NAT traversal and robustness to switching of IP addresses or network interfaces (e.g. Cellular to WiFi, and vice-versa).

UDT is a reliable UDP based application level data transport protocol for distributed data intensive applications over wide area high-speed networks. UDT uses UDP to transfer bulk data with its own reliability control and congestion control mechanisms. The new protocol can transfer data at a much higher speed than TCP does. UDT is also a highly configurable framework that can accommodate various congestion control algorithms.

Fast, reliable & non-intrusive message-oriented virtual network protocol for the JVM 1.6+.
It resides between the transport and the application layer.
Characteristics:

  • 传输数据的可靠性
  • 收到,未经验证的数据立即可用
  • 包比UDP的包大,比TCP的包小
  • 无流量控制
  • 无拥塞控制

免责声明:我是 JNetRobust 的作者,它是新的并且仍处于 alpha 阶段。

关于Java可靠的UDP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6531956/

相关文章:

c - 检测断开的客户端套接字连接(跨平台适用性)

java - 当系统日期更改时,获取系统日期和时间的 TimerTask 停止运行

java - Kotlin 将字符串数组映射并缩减为 Map<String, Any!>

java - 使用java从大文件中读取 block

Java字符串等于不适用于UDP服务器收到的数据包

c - 关于解码UDP数据包的建议

android - Android 中的 RTSP 客户端

c - 如何通过缓冲区传递整数?

java - jpl 库不适用于 java maven 项目

c++ - 带有 boost::asio::read 的 EOF