Talk:Wii Web Server

From WiiBrew
Jump to navigation Jump to search

My quality assurence

Rest assured that I will be merciless when doing quality assurements on this one. Don't expect to get any cheats by me, you better be designing a proper structure. While I am fine with c, I do recommend c++. Btw, I checked the CVS (Personally I suggest that you upgrade to SVN instead of CVS, SF got both and they are equally easy to work with, SVN just is better) repo and while I sure didn't have any high expectations, I wasn't stunned. Better get something neat done. Oh yeah, just for a challenge, see if you can write a PHP SAPI for the service while you are at it, it's easier than you expect.--henke37 10:46, 4 June 2008 (PDT)

Seriously, I checked out the progress and I am not enjoying it. Get a grip! No sleeping during the program! No infinite recursion! No random while loops! Write a real request parser! And stop with the hardcoded reply headers. It is one thing to make a POC, but that stage is past now, time to start working for real. Also, go learn threading, a http service just can't be single threaded.--henke37 01:56, 5 June 2008 (PDT)
Cut me some slack, this is my first proper C project, i know so little C that everytime i do somthing i have to google it. Everything that has been done is meant to be functional, not pretty. There are no wrong ways to code, just finding a way that works. I have been coding it for a week, for about and hour daily, so thats about 7 hours to get this far. Be patient, the request parser is in the works. The sleeping has to be there for the HTTP sending to work without the socket closing before its has finished being sent, if its not there then the browser complains about loss of connection. This was never means to be a massive serious project, just a way to learn C that turned out better than expected. :-P Cboomf 02:02, 5 June 2008 (PDT)
I am deeply sorry that I've been so harsh. I now see that you are honestly trying your best. I think that you are making progress. Please don't think that all I do is to make harsh comments, I am happy to assist if you chat me up on IRC. I promise to cut you some slack.--henke37 12:50, 6 June 2008 (CEST)
Much appreciated henke37 Cboomf 18:44, 6 June 2008 (CEST)

Time for some constructive criticism

I think I see a negative pattern in your code. Do not make a new function for each page. Make a generic function that you call with different parameters. Like a struct or object with a bunch of fields that represent the request. And do not do any infinite recursion. Do infinite loops, not recursion.--henke37 09:56, 8 June 2008 (CEST)

09-June-2008

Please abstract things a bit more. No stupid globals, and seriously, get rid of the infinite recursion. Also, I hope that you understand how extremely likely it is for a file to not be found. Send proper 404 responses instead of being open for a single hit DOS attack. Also, start using threading now, a single thread just does not do for a multi user service.--henke37 00:11, 9 June 2008 (CEST) Once i have the file size sorted (i.e allow files larger than 4KB), then 404 and threading are on the cards cos only then will this start being any use Cboomf 20:22, 10 June 2008 (CEST)

"Lump of fun"

I think I found it! Goto 192.168.X.Y/tux to find!

[1]

Well done wasn't too hard was it XD... Cboomf 11:19, 8 June 2008 (CEST)

Usage

Where do the HTML files go? Just trying to do some of my own home theater testing ideas with this. Also, what does this use? Apache etc. type of thing. Pinball wizard 21:16, 7 June 2008 (CEST)

Until alpha v0.4, you can't use your own html files, (well, you can, sort of, but its not recommended and might not work) and it uses my own code, not apache or anything Cboomf 22:23, 7 June 2008 (CEST)
Thanks, I'm going to use tis later on today. Time to start home theatering remotely.
Alpha v0.4 only lets html be loaded, but in alpha v0.5 any file type is planned Cboomf 17:23, 8 June 2008 (CEST)

PHP

Hey,

I like the progress of your web server, I think its coming along nicely. I do not know if it is a hard thing to do but would it be possible to implement PHP?

PHP is designed to be easy to add to servers. You just need to call less than 10 functions. One to init the engine, one to init the request, one to set the callback for the output headers, one to close the request and one to close the engine.--henke37 23:24, 22 June 2008 (CEST)
Yeah, the header part is going to be the killer here. This project just does not do the headers at all. It just has them hardcoded. Btw, for those who want to give this a shot, look at the SAPI folder in the PHP sources, you need to create one folder like those.--henke37 23:33, 22 June 2008 (CEST)

Torrent Files?

I was looking at the supported files and I saw .torrent? What? When you put it on your Wii, will it DOWNLOAD .torrent files or what? If not, then what is the point of implementing it? TheDuck 07:54, 23 June 2008 (CEST)