Working on setting up a scalable bot farm, set up db and client server communications work no problem however after every request from the client the connection closes and I'm a bit lost as to how to maintain the connection with the server and have it "idle" until another request is made? Client sends request to server for login, server gets login from db and sends login to client which logs in. I want the client to "idle" while the bot script is running until another request is made from the script (ex update bot status on db).
Server: https://pastebin.com/4C1wudYS
Client: https://pastebin.com/qZmRyFvH
New to Java, any advice/tips much appreciated, thanks in advanced!