Deep Bot - Twitch Streamer Assistant

Deep Bot => Help/Support => Topic started by: altimitmine on September 07, 2016, 02:00:11 PM

Title: Deepbot API Connection Limit? Or am I doing this wrong?
Post by: altimitmine 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.
Title: Re: Deepbot API ... I think I figured it out
Post by: altimitmine 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