Sort:  

Dude, you should do it with Thread. One Thread for each incoming client. Build a class, that extends java.lang.Thread.
You will get a much cleaner code and the handlling of the clients is much easier.
Also, endless loops are never good. Make an escape point to the loop, e. g. buy pressing a key on the server console.

Coin Marketplace

STEEM 0.04
TRX 0.33
JST 0.102
BTC 63976.84
ETH 1788.48
USDT 1.00
SBD 0.39