DLL project description
The NsTorm project will build the NsTorm.dll which extends ns's capability with the power of MFC. Ns interacts with NsTorm.dll through agree interface which is defined in "TormItfc.h" (Description..)
For the easiness of implementation, I define two basic class, TormApp and TormTimer.The TormApp is parent class for all the application class which is able to interact with ns. The TormTimer is the representative of ns's timer in the DLL.
In the NsTorm project, I implement a sample application class, BroadcastTime. There are two kinds of BroadcastTime object , BroadcastTime server and BroadcastTime client. The BroadcastTime server broadcast it's current time to all the clients in the multicast group periodically. And the BroadcastTime client can occasionally request the server for it's current time. On receiving the request from the client, the server will broadcast it's current time to all the group member immediately.
Here are the codes for BroadcastTime (header and implementation).
Note: This page only explain the basic thing about the NsTorm. You'd better study it's code as a whole to understand all the stuff. The code is very simple and easy to understand.