My test server program receives packets from the Client. Im my server program the data received is assigned to:
When my client is set to continually send a message, eventually (only after a few seconds) the server throws an ArrayIndexOutOfBoundsException Error.
I assume the data doesn't get cleared and is filled very quickly. I would have thought that, because the data array is declared and initialized inside the for loop, the garbage collector would take care of it.