Jump to content

Persistent client connection to async server


Its Not Okay

Recommended Posts

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!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...