Author Topic: Aggregating webserver improvements  (Read 1960 times)

Do you know what they were at least? If you can remember but can't find them I can throw them in.
After that I'll put out the test version - just did a live chat with 3 people and it worked with them all.
I mainly did some things that intercepted a request for an image and redirected it to a image hosted on dropbox, allowing me to log ip's

my best change was making the timeout time 1000ms instead of 10000ms

it boosted webserver performance by, well, 1000%
(I do hope I did that math right)

I mainly did some things that intercepted a request for an image and redirected it to a image hosted on dropbox, allowing me to log ip's

I was trying to think of a good way to do this. I could make it so when the webserver needs to open up an image file, it opens the file at the path (which the developer would either manually make or create via script) that simply contains a url to where to find it on the web. So, basically a text file with a .png/.gif/etc extension.

my best change was making the timeout time 1000ms instead of 10000ms

it boosted webserver performance by, well, 1000%
(I do hope I did that math right)

It's 1000 by default, do you mean you changed it to 10000?

It's 1000 by default, do you mean you changed it to 10000?
oopsies :( EDIT: saw the file, turns out I turned it to 10k, then down to 500. still made a big difference, apparently the browser sends two queries or something, and the webserver can't handle it.
I was trying to think of a good way to do this. I could make it so when the webserver needs to open up an image file, it opens the file at the path (which the developer would either manually make or create via script) that simply contains a url to where to find it on the web. So, basically a text file with a .png/.gif/etc extension.
sounds okay

edit finally found it
checking for SUPER SECRET MISSLE LAUNCH CODES (there probably isn't any) then uploading
« Last Edit: November 28, 2012, 11:32:21 PM by Lugnut »

boy this code is stupid. i wrote it a long time ago.
i prefixed comments from today with "11-28-12" but you probably would've figured that out on your own

i noted a useful feature i forgot to mention in these posts: getBL_ID/NameFromIP(%ip), does just as it says on the tin. requires some form of logging of ip's and stuff
sucks for people with dynamic ips

http://pastebin.com/bv2G53FW
expires in a month
i dunno why i put that in there

Ok so... here's what I got the other day. Haven't added anything since then since I've been busy.

Source*
Test Page
Changelog (diff)

*Currently modified to work with the test page. Check out Webclient::onWebSocketLine (line 761).

Download and put the source at config/webserver.cs and the test page at config/pages/index.tqs.
Then run this bit of code (hopefully I'm not forgetting a step) to get the websocket demo started:

Code: [Select]
exec("config/webserver.cs");
$WebSocketPassword = "/chat";

Open http://localhost in your browser or link your IP to others if you have ports forwarded to test.
Everything is subject to change very soon so don't bundle this into any released add-ons just yet.

Bumping if this isn't too old, where are you on this?

Bumping if this isn't too old, where are you on this?

That post was last I worked on it - end of semester and finals came around, and since I actually got everything working, I didn't mind taking a break. Did you encounter any errors with it? It should be able to be used for any custom websocket application once you make the proper accommodations for Torque's sillyness (as demonstrated in the test page source).

well i haven't honestly tested it out yet, lol

just wondered if there was a more up to date version or something

end of semester and finals came around
i hear that