Creating a basic chat client-server program


This is the start of creating a basic chat client/server program.

Assignment 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:

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)
  • 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

Request for Solution File

Ask an Expert for Answer!!
Computer Networking: Creating a basic chat client-server program
Reference No:- TGS01238131

Expected delivery within 24 Hours