EsotericSoftware / kryonet

TCP/UDP client/server library for Java, based on Kryo
BSD 3-Clause "New" or "Revised" License
1.82k stars 419 forks source link

Incoming TCP packet delay from client #100

Closed ghost closed 9 years ago

ghost commented 9 years ago

http://stackoverflow.com/questions/31499965/how-can-tcp-packet-be-delayed-in-client-server-model I use KryoNet 2.21 version.

NathanSweet commented 9 years ago

It's disabled in TcpConnection. What did you change?

On Sun, Jul 19, 2015 at 7:12 PM, yeeapple notifications@github.com wrote:

Closed #100 https://github.com/EsotericSoftware/kryonet/issues/100.

— Reply to this email directly or view it on GitHub https://github.com/EsotericSoftware/kryonet/issues/100#event-359492033.

ghost commented 9 years ago

That trick did not work. I have tried to call setOption in Server.java but somehow I missed that I was using different JAR file. I have tried to send packets via UDP but still there's delay which occurs not so often as using TCP.

NathanSweet commented 9 years ago

You might try different Android devices. Android is known for being junk.

On Mon, Jul 20, 2015 at 1:38 PM, yeeapple notifications@github.com wrote:

Reopened #100 https://github.com/EsotericSoftware/kryonet/issues/100.

— Reply to this email directly or view it on GitHub https://github.com/EsotericSoftware/kryonet/issues/100#event-359898360.

ghost commented 9 years ago

I found that it worked pretty well on LG phone. There were only a few hiccups at start. What I believe that there are some problems with Huawei Y300 phone because sent packets are stacked (what I assume) and delayed that way.

NathanSweet commented 9 years ago

Sounds like Android. Doubt anything can be done, sorry!