Author Topic: Deepbot API Connection Limit? Or am I doing this wrong?  (Read 1274 times)

0 Members and 1 Guest are viewing this topic.

altimitmine

  • Youngling
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
  • Twitch Name: altimitmine
Deepbot API Connection Limit? Or am I doing this wrong?
« on: September 07, 2016, 02:00:11 PM »
I made a little PHP class to interface with Deepbot. Another script which uses the class will connect, run a command (such as getPoints) then disconnect. This can happen in quick succession (with milliseconds). Occasionally the class will fail, although I have yet to lock it down to failing to connect or failing to authorize. I was just wondering if I may be handling these requests wrong, and/or if there is a limit of how many simultaneous connections are allowed to the Deepbot API Server (port 3337).

Here is my class:
http://pastebin.com/fZa4bLg1

Thanks in advance.

altimitmine

  • Youngling
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
  • Twitch Name: altimitmine
Re: Deepbot API ... I think I figured it out
« Reply #1 on: September 11, 2016, 09:56:43 AM »
I believe I have sorted out the issue, the socket timeout was too low. This led me on a chase to figure out how to most optimally and quickly obtain the data, and I believe I am satisfied with the solution.

In my case, I am proxying through nginx to add SSL support. But this should work with a direct connection to Deepbot as well.

Here is my updated class:
http://pastebin.com/3Y2i2Mpx