Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

WiiBServer: Difference between revisions

From GameBrew
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#seo:
|title=Wii Homebrew Apps (Utilities) - GameBrew
|title_mode=append
|image=wiibserverwii.jpg
|image_alt=WiiBServer
}}
{{Infobox Wii Homebrews
{{Infobox Wii Homebrews
|title=WiiBServer
|title=WiiBServer
|image=wiibserverwii.jpg
|image=wii2.png
|description=Tiny unfinished HTTP/1.0 web server
|description=Tiny unfinished HTTP/1.0 web server.
|author=Jay
|author=Jay
|lastupdated=2008/06/13
|lastupdated=2008/06/13
Line 14: Line 8:
|version=0.1
|version=0.1
|license=Mixed
|license=Mixed
|download=https://dlhb.gamebrew.org/wiihomebrews/wiibserverwii.7z
|download=https://dlhb.gamebrew.org/wiihomebrews/wiibserver.7z
|website=
|website=https://wiibrew.org/wiki/WiibServer
|source=https://dlhb.gamebrew.org/wiihomebrews/wiibserverwii.7z
|source=https://dlhb.gamebrew.org/wiihomebrews/wiibserver.7z
}}
}}
'''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.
WiiBServer is an unfinished HTTP/1.0 server that serves as a tool for testing networking functions on the Wii.  


== History ==
This project is no longer being updated, take a look at [[Wii Web Server]] if you are interested in something similar.
I just wanted to play a little with networking functions on the wii so I started with something simple, the [http://jmarshall.com/easy/http/ 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:
== Features ==
* there's already [[Wii_Web_Server_Wii|another project of that kind]]
* Process request one after the other (one thread).
* the HTTP/1.1 protocol is far more complex to handle
* URIs are limited to 1024 chars.
* there's no real point in running a web server on the wii :-S
* Resources are loaded from the front sd card, in the /wiibsrv/htdocs folder.
* there's already some specialized software for that (apache, ...), would be more interesting to port existing robust software
* I don't have enough time


== Requirements ==
==Installation==
Nothing special on the wii. On the PC side, a web browser. Some files on sd card in the /wiibsrv/htdocs folder.
How to setup: On the PC side, a web browser. Some files on sd card in the /wiibsrv/htdocs folder.


== How does it work ==
Launched successfully with the [[Twilight Hack Wii|Twilight Hack]] and the [[Wii Homebrew Launcher]]. Have not tried the [[Homebrew Channel Wii|HBC]] or TcpLoader but should 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.
==User guide==
===How does it work===
WiiBServer is a simple application that utilizes [https://wiibrew.org/wiki/Socket socket] programming to function as a HTTP/1.0 server for testing networking on the Wii. When launched, the server initializes the socket subsystem, sets up the necessary parameters, and waits for incoming connections.


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
The IP of the Wii is displayed on screen for clients to connect. The server runs on two threads, one for handling button inputs and the other for accepting connections and processing them.
 
== 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).
* process request one after the other (one thread)
* URIs are limited to 1024 chars
* resources are loaded from the front sd card, in the /wiibsrv/htdocs folder


== Missing/TODOs ==
However, the server may experience freezing or dropping connections after a few requests, especially when loading multiple resources for a single html page or when requesting large images.
* memory leaks fixing (if any)
* multithread (possibly with pooling), the process_request() function should be ready for that
* error templates stored on sd card, in the /wiibsrv/templates folder
* directory listing
* http headers handling
* http/1.1


== Run ==
===How to use===
Launched successfully with the [[Twilight Hack Wii]] and the [[Wii Homebrew Launcher Wii]]. Didn't try the [[Homebrew Channel Wii|HBC]] or TcpLoader but should work.
Once started, press the A button to start the "accepting" thread. Then press B to stop listening.  


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).
Browse from a web client (use an URL that refers to a file since directory listing is not yet supported).


==External links==
==External links==
* Wiibrew - https://wiibrew.org/wiki/WiibServer
* WiiBrew - https://wiibrew.org/wiki/WiibServer

Latest revision as of 09:25, 25 February 2023

WiiBServer
Wii2.png
General
AuthorJay
TypeUtilities
Version0.1
LicenseMixed
Last Updated2008/06/13
Links
Download
Website
Source

WiiBServer is an unfinished HTTP/1.0 server that serves as a tool for testing networking functions on the Wii.

This project is no longer being updated, take a look at Wii Web Server if you are interested in something similar.

Features

  • Process request one after the other (one thread).
  • URIs are limited to 1024 chars.
  • Resources are loaded from the front sd card, in the /wiibsrv/htdocs folder.

Installation

How to setup: On the PC side, a web browser. Some files on sd card in the /wiibsrv/htdocs folder.

Launched successfully with the Twilight Hack and the Wii Homebrew Launcher. Have not tried the HBC or TcpLoader but should work.

User guide

How does it work

WiiBServer is a simple application that utilizes socket programming to function as a HTTP/1.0 server for testing networking on the Wii. When launched, the server initializes the socket subsystem, sets up the necessary parameters, and waits for incoming connections.

The IP of the Wii is displayed on screen for clients to connect. The server runs on two threads, one for handling button inputs and the other for accepting connections and processing them.

However, the server may experience freezing or dropping connections after a few requests, especially when loading multiple resources for a single html page or when requesting large images.

How to use

Once started, 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).

External links

Advertising: