简体   繁体   中英

KryoNet - Sending packets to Android clients

I am developing an Android app which has to connect clients to my server for sending/receiving different sort of packets. To achieve that, I am using the KryoNet library. My clients connect themself to the server and send their own packets successfully. But my problem is that the server seems to failed at responding to them. I have registered these packets in the same order on the server side and the client side and I use the connection parameter of the overrided reveived method from kryonet.Listener to respond (eg connection.sendUDP(...) ). I have an Android 5.0.2 , I use the 2.22.0-RC1 version of KryoNet both on the server side and the client side... With the option Log.set(Log.LEVEL_DEBUG) enabled, I can see that the server starts to write a packet ( DEBUG: [kryo] write: PacketMovement ) but I receive nothing.

I would really appreciate any help on this issue.

有相同问题的人的答案: https : //github.com/EsotericSoftware/kryonet/pull/111

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM