Help With Assignments

Got confusion or query ???

Looking for customized, unused and Plagiarism free solutions ???

Submit your assignment here

.00

Keywords

CSP2308 Assignment 1 Background: This is the start of creating a basic chat client/server program. In Assignment 1 we will focus on using a basic input/output with streams. Assignment 2 will add network communications (sockets), more robust programming, threads and adding the ability to handle multiple remote clients. This version of the chat server will run locally, receive requests from the keyboard (console) and fulfil them with local resources only. There is no networking in this version. NOTE: Design means Pseudocode, Flowcharts, Functional Decomposition, etc. This is NOT how prettily your code is structured or laid out! Objectives: Design and Write a program that does the following: • Loads and uses mychatserver.conf to set internal variables as mentioned below. o If mychatserver.conf doesn`t exist, your program should terminate gracefully with an appropriate message and code. o If mychatserver.conf isn`t readable, your program should terminate gracefully with an appropriate message and code. This is different from the file not existing. • Takes input from the keyboard. o Input should be handled as a separate function o All input should use streams. At the very least use fscanf(). scanf() should NOT be used. o If the input not preceded with a / then you should print this to the screen. o If the input IS preceded with a / then you should interpret this as a command ? /name should allow the user to change the displayed username ? /reload should reload the configuration file and reset your program parameters based on what it reads from the configuration file. ? /status should show current details including but not limited to: • Connection details (console for Assignment 1) • Current user name • Current server name • Name of the current log file • Any other details you think are useful ? /servername should allow the user to change the server name ? /quit should allow the user to quit • Sends output to the screen o Output should be handled as a separate function o All output should use streams. At the very least use fprintf(). printf() should NOT be used. o All chat output should be preceded with the user name. ie: Brett o Status output should be printed with a different identifier. ie: # • Your program should have a logging facility. o You should check to see if the log file exists. o If it does, open it and begin logging important messages o If it does not, create it and begin logging important messages Using make to manage (at minimum) these files: mychatserver.c This should contain the main logic of your code mylogger.c This file should contain any functions that handle logging operations myinput.c This file could handle all input including safely checking if the input is valid, checks against exploits such as buffer overflows. myoutput.c This file could handle all input including safely checking if the input is valid, checks against exploits such as buffer overflows. mychatserver.conf This file should be a configuration file that you can use to set the behaviour of your main program. The required configuration options are small at the moment but this will be more heavily used in the second assignment. Feel free to use other files to break up the structure of your program. Marking Guide Design Implementation Use of make and multiple files 2 Use of mychatserver.config 2 2 File Functions (file exists/readable, open, read, etc) 2 2 Output meets requirements 2 2 Bonus Credit (Extra features over and above) 2 2 Program compiles and runs 2 Sub-Total 8 12 Total 20 If you manage this, CONGRATULATIONS! You are on your way to actually making your own chat (basic) server!

Question Set #312

Views: 209
Complete project as per the given instructions.
You need proper software or framework to run/execute it.

Attachment: Click here to download