连接在Java服务器IOCP(Android版) [英] Connecting to IOCP server in Java (Android)
问题描述
我想打一个网络游戏的Android。
我打算通过C,使与IOCP模型服务器++。这应该做工精细,问题是客户端。结果
在C ++使用IOCP客户端的例子 WSASyncselect
或 WSAEventSelect
。
我找不到任何Java的例子是同样的工作像异步接口。
问题:
- 有没有像
WSASyncselect()
Java中的东西吗? - 如果不是,我怎么能做到这一点?
的JDK 7的Windows实现的Java 7NIO.2班
有关更深入的信息,请查看包含的实施的.java源及其相应的的一起http://hg.openjdk.java.net/jdk8/tl-gate/ JDK /文件/ d7ed56d57d97 / src目录/窗/本地/阳光/ NIO / CH /相对=nofollow> C本机的来源和JNI绑定
。
I'd like to make an Online Game with Android.
I'm planning to make Server with IOCP model via C++. This should work fine, the problem is the client.
IOCP client example in C++ uses WSASyncselect
or WSAEventSelect
.
I couldn't find any Java examples that same work like async socket.
Questions:
- Is there anything like
WSASyncselect()
in Java? - If not that, how could i do it?
The JDK 7 Windows implementation of the Java 7 "NIO.2" classes
- AsynchronousSocketChannel
- AsynchronousServerSocketChannel
-
call the WSA[...] functions of the Windows "Overlapped IO" API behind the scenes.
For more in-depth information check out the OpenJDK repository folders containing the implementation .java sources along with their corresponding .c native sources and JNI bindings .
这篇关于连接在Java服务器IOCP(Android版)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!