Hi !
Featured games (87)
games approved by the League of Dukes
Games in Showcase (671)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (727)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Networking & Multiplayer / Re: Kryonet - Client continues to send but stops receiving on: 2013-05-05 19:40:16
Ah, that seems to have fixed it!  I bumped the Client send rate back to 60 messages per second and it's working as expected.

Thanks for your help.
2  Game Development / Networking & Multiplayer / Re: Kryonet - Client continues to send but stops receiving on: 2013-05-05 10:11:43
Okay, it I have mitigated the problem by sending client position updates to the server at a slower rate.  I raised INPUT_SEND_RATE from 1000/60 to 1000/10 and my game is working as expected.
3  Game Development / Networking & Multiplayer / Re: Kryonet - Client continues to send but stops receiving on: 2013-05-05 09:49:18

// Line 221
if (select == 0) {
         // NIO freaks and returns immediately with 0 sometimes, so try to keep from hogging the CPU.
         long elapsedTime = System.currentTimeMillis() - startTime;
         try {
            if (elapsedTime < 25) Thread.sleep(25 - elapsedTime);
         } catch (InterruptedException ex) {
      } else {
         Set<SelectionKey> keys = selector.selectedKeys();
         synchronized (keys) {
            for (Iterator<SelectionKey> iter = keys.iterator(); iter.hasNext();) {
               SelectionKey selectionKey =;

// ...

I started GameClient in a debugging session and I set the debugger to break if the selector had any keys (i.e., if the program reached "Set<SelectionKey> keys = selector.selectedKeys();").  The program would only break once every five seconds or so (or it wouldn't break at all before timing out).  In the client log, it was seen that all of the GameStateUpdate packets delivered from the server would then be processed at once.  So it looks like the client is receiving the messages from the server, but they can't be delivered to Kryonet for some reason, so they all clump up until they are all delivered at once.

I also removed the synchronized blocks in my code and it didn't seem to affect anything.

I am running the client and the server on the same computer.  The client is connecting to the server at
4  Game Development / Networking & Multiplayer / Kryonet - Client continues to send but stops receiving on: 2013-05-05 05:59:47
Hello, I am trying to make a simple multiplayer game using Slick and Kryonet.

I am having problems with the client.  It will connect to the server and read a few messages, but after that, it stops receiving messages and it times out.  It doesn't stop sending messages to the server, however.  The server seems okay, as it is sending and receiving messages as I expect that it would. After 12s, the client times out.  The debugger also indicates that, after the first few packets received, the client listener received function is not being called at all.

I've tried running the client in debug mode and pausing it about a second after it connects.  The messages that ordinarily would not have been read now show up in the message queue.  Similarly, if I prematurely quit the client (not running in debug mode), the client log shows that the client has read the messages.

I'm confused!  Any help would be appreciated.


Server Log:
Client Log:
Pages: [1]
IanParcs (40 views)
2016-04-18 14:18:53

KaiHH (38 views)
2016-04-18 08:35:41

KaiHH (70 views)
2016-04-15 12:43:58

theagentd (71 views)
2016-04-14 02:16:17

theagentd (84 views)
2016-04-14 02:15:43

IanParcs (97 views)
2016-04-12 03:51:16

IanParcs (41 views)
2016-04-12 03:50:03

IanParcs (37 views)
2016-04-12 03:49:54

IanParcs (34 views)
2016-04-12 03:49:52

IanParcs (40 views)
2016-04-12 03:49:52
Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17

List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50

Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!