Difference between revisions of "GEMS Wifi"
m |
WiibrewBot (talk | contribs) m (Robot: Cosmetic changes) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
− | {{Infobox | + | {{Infobox development tools |
| title = GEMS Wifi | | title = GEMS Wifi | ||
| image = | | image = | ||
− | | type = | + | | type = library |
| author = GEMISIS | | author = GEMISIS | ||
| maintainer = GEMISIS | | maintainer = GEMISIS | ||
Line 19: | Line 19: | ||
= General Info = | = General Info = | ||
− | This is a development tool for the Wii and DS. | + | This is a development tool for the Wii and DS. It can be used to connect both devices via wifi. |
To use this, please edit your make file to use the library, then include GEMS_WifiWii.h or GEMS_WifiDS.h depending on your platform (Wii or DS). | To use this, please edit your make file to use the library, then include GEMS_WifiWii.h or GEMS_WifiDS.h depending on your platform (Wii or DS). | ||
Please note that this will not connect you to wifi autmatically (you must do that part yourself) | Please note that this will not connect you to wifi autmatically (you must do that part yourself) | ||
Line 59: | Line 59: | ||
</code> | </code> | ||
− | This will make the game continuously wait for a client to connect. | + | This will make the game continuously wait for a client to connect. Please note that it will not stop until a client has connected. |
== Connecting to a server == | == Connecting to a server == |
Latest revision as of 17:06, 10 August 2009
GEMS Wifi | |
General | |
---|---|
Author(s) | GEMISIS |
Maintainer(s) | GEMISIS |
Contributor(s) | GEMISIS |
Type | Library |
Version | 0.1 Beta |
Licence | GPL/etc |
Links | |
Download |
General Info
This is a development tool for the Wii and DS. It can be used to connect both devices via wifi. To use this, please edit your make file to use the library, then include GEMS_WifiWii.h or GEMS_WifiDS.h depending on your platform (Wii or DS). Please note that this will not connect you to wifi autmatically (you must do that part yourself)
The downloads are to the right, if you have any questions or issues about this library, please email me at GEMISIS@live.com
Creating a server
To use create a server with the Wii or DS, use this:
For Wii:
s32 host = 0;
host = TCP_Server(80, 5);//TCP_Server(port, number of players)
For DS:
int host = 0;
host = TCP_Server(80, 5);//TCP_Server(port, number of players)
this would set host as the server socket.
Getting a client
To wait for a client with the Wii or DS, use the following:
For Wii:
s32 client = 0;
client = TCP_GetClient(host);//TCP_GetClient(host socket)
For DS:
int client = 0;
client = TCP_GetClient(host);//TCP_GetClient(host socket)
This will make the game continuously wait for a client to connect. Please note that it will not stop until a client has connected.
Connecting to a server
To connect to a server with one of the systems, you can use the following:
For Wii:
s32 host = 0;
host = TCP_ClientConnect("192.168.0.1", 80);//TCP_ClientConnect(ip address, port)
For DS:
int host = 0;
host = TCP_ClientConnect("192.168.0.1", 80);//TCP_ClientConnect(ip address, port)
What to do now that your connected
Now that everything is connected, you can use the normal net_send (for Wii) send (for DS) net_recv (for Wii) and recv (for DS) to send and receive data for that system.
Video
Here is a video of an older version of the library in use: http://www.youtube.com/watch?v=KksMFhvNcYs