WiibServer

From GameBrew
Jump to: navigation, search
WiiBServer
General
Author(s) Jay
Type Utility
Version 0.1
Licence Not specified (open source)
Links
[Media:Wiibsrvr.zip Download]
[Media:Wiibsrvr.zip Source]

WiiBServer is a small and unfinished HTTP/1.0 server, used to test networking functions on the Wii. It loads resources from the front sd card.

Contents

History

I just wanted to play a little with networking functions on the wii so I started with something simple, the HTTP/1.0 protocol. Then I decided to try the sd card api and ended up with threads. Very interesting :-)

However, I won't work much on this project because:

Requirements

Nothing special on the wii. On the PC side, a web browser. Some files on sd card in the /wiibsrv/htdocs folder.

How does it work

Well, nothing magic here, just socket programming. When started, the server initializes the socket subsystem, setups some parameters (bind), and then listens for incoming connections. The Wii's IP is displayed on screen so that clients can connect.

There's two threads, one that waits for buttons, the other that accepts incoming connections and processes them.

It seems the server freezes after two or three requests, especially after loading multiple resources for a single html page. It also drop when requesting a big image. Not time to fix it, sorry :-O

Source code

Commented source code is provided. Hope it will help :-) It has been compiled with devkitPro (release 20080602).

Features

This server is rather limited (on purpose).

Missing/TODOs

Run

Launched successfully with the Twilight Hack and the Wii Homebrew Launcher. Didn't try the HBC or TcpLoader but should work.

Once started, you should press the 'A' button to start the accepting thread. Then press 'B' to stop listening. Browse from a web client (use an URL that refers to a file since directory listing is not yet supported).

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
Make a donation