This assignment involves the use of the Microsoft Visual C++, version 6 to develop a multithreaded application. This assignment involves the development of a multithreaded server application to demonstrate thread-based TCP communication between multiple ‘Telnet’ clients and a server you will develop, making use of a queue to serialise and log messages to a text file.
I. Develop a server application called “TCPServer?? based on the TCP server demo code on the module Web-site. This application can be a Win32 Console application, optionally including MFC support. The main thread in this program must create a ‘listening’ thread to await TCP/IP connections from ‘Telnet’ clients, as per the demo code. Additionally, a new thread must be created which ‘polls’ a message queue and when text data is available, extract the data and write it out to a single text file. Every TCP/IP client thread must be modified to insert data into the queue when the return key is pressed. Thus the application will ‘log’ all messages entered via multiple ‘Telnet’ clients. Attention should be given to terminating any new threads correctly. Additional marks will be awarded for modifying the queue system to make use of ‘Events’, rather than ‘polling’, otherwise known as ‘busy-waiting’.
II. For a mark of above 60, the application should be extended in some novel way, such as an MFC dialog application with ‘List Boxes’ e.t.c. or demonstrate some other interesting functionality.
¨ Network facilities, as well as Visual C++ are available in room 312 (except when a class is in progress).
¨ Example code for the server application can be found on the RTP Web-site.
¨ Marks will be awarded for partial completion of the assignment, however the report must clearly identify the working aspects of the application, with supporting tests and results.
The TCPserver demo is attached herewith.
¨ Handwritten work will not be accepted without prior arrangement.
1) A report containing the following sections: Introduction, Approach, Design, Findings, Results, Conclusion and References. Additionally, an appendix may contain code fragments of particular relevance, each with a short description. The word count should not exceed 2000 words, excluding the appendices and headings.
2) A CD or ZIP disk (attached to your report) containing all the source code and project files for your client & server applications.