cybereality Posted March 6, 2006 Share Posted March 6, 2006 I put together this simple little udp example for testing the ds wifi. I'm sure this has been done before, but I figured a simple example would be helpful to some. The code is heavily based on the example code from the WinSock2.0 book. It compiles on cygwin/g++ and some others (but I have not tested). You'll also need the winsock dll to do the dirty work. This is not a DS app. The file contains a server app and a client app, both for the pc. With this, you can test any UDP programs using a simple command line chat program. It is single threaded, so you can only chat back and forth (like ping-pong). I have tested it with the udp-example sgstair released and also the stripped down version by sintax. It should work with any app the uses this protocol. The best part is that you can test the server-side functions in another command window instead of using the ds to test. I started this project to familiarize myself with udp with the hopes of making a wifi enabled app for the ds. Unfortunately, my professional projects have eaten all my time and I had to put the project on hold. Now that it seems like the new update will have TCP/IP and other functionality, I dont know if I will bother continuing the project. So here is the source for anyone that needs it. I have also included the executables if you just wanted to test your udp app with a command line program. Using this code as a foundation it would be possible to leverage pc libraries to do the dirty work and use the ds as a simple terminal to recieve the information. I hope someone will benefit. UDP Server/Client Example (binary & source) // cybereality Link to comment Share on other sites More sharing options...
sypherce Posted March 6, 2006 Share Posted March 6, 2006 (edited) This looks and works nice, and I'll probably make use of it. One thing I noticed is you need cygwin1.dll, heres a link to a version that doesn't need it. udp_example.gcc.zip Edited March 6, 2006 by sypherce Link to comment Share on other sites More sharing options...
cybereality Posted March 7, 2006 Author Share Posted March 7, 2006 (edited) Thanks sypherce. I meant to mention that it needed cygwin1.dll. I just totally forgot. If you need to find it you can just put 'cygwin1.dll' into google and theres a bunch of sites that have it. Then copy and paste into the windows/system32 folder. Edited March 7, 2006 by cybereality Link to comment Share on other sites More sharing options...
infernoDS Posted March 8, 2006 Share Posted March 8, 2006 Looks certainly nice! Something like my DSChat (now DSRemote) back then, also relying heavily on Winsock, but not that clear (code) as this one so: nice work! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now