alkatran
Jun 10th, 2007, 02:36 AM
Introduction
This project is an activex DLL which takes care of the headache of writing client and server code with winsock. It allows you to simply create a "crgNetworker" object, call "showSetupForm" (which displays a GUI for creating a server or connecting to a server), and continue on your merry networking way. I use this project all the time with the small games I write.
What it really does
Calling showSetupForm displays a GUI which takes care of setting up the network. Here the user can decide to be a server or connect to a server. Once everyone is connected, any one of the user hits 'start' and a 'start' signal is sent to all other users. Starting returns control to the calling application and makes the server stop accepting new connections. At this point data can be sent and received using the send subroutine and the received event of the crgNetworker object.
Details
- Very well commented code
- Abstracts away the difference between the server and clients
- Makes sure packets arrive whole
- Fails pretty gracefully when something goes wrong (no msgbox calls)
- No known bugs
Drawbacks
- Everything you send is heard by everyone (no private sending)
- Maximum of ~255 clients
Attachments
- Zip file including the DLL project, and example project, and a read me.
- A picture of the showSetupFrom GUI
*edit* The dll project in the original attachment still had 'binary compatibility' turned on, which would cause an error to be shown when the project was opened. I've fixed this.
This project is an activex DLL which takes care of the headache of writing client and server code with winsock. It allows you to simply create a "crgNetworker" object, call "showSetupForm" (which displays a GUI for creating a server or connecting to a server), and continue on your merry networking way. I use this project all the time with the small games I write.
What it really does
Calling showSetupForm displays a GUI which takes care of setting up the network. Here the user can decide to be a server or connect to a server. Once everyone is connected, any one of the user hits 'start' and a 'start' signal is sent to all other users. Starting returns control to the calling application and makes the server stop accepting new connections. At this point data can be sent and received using the send subroutine and the received event of the crgNetworker object.
Details
- Very well commented code
- Abstracts away the difference between the server and clients
- Makes sure packets arrive whole
- Fails pretty gracefully when something goes wrong (no msgbox calls)
- No known bugs
Drawbacks
- Everything you send is heard by everyone (no private sending)
- Maximum of ~255 clients
Attachments
- Zip file including the DLL project, and example project, and a read me.
- A picture of the showSetupFrom GUI
*edit* The dll project in the original attachment still had 'binary compatibility' turned on, which would cause an error to be shown when the project was opened. I've fixed this.