Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

he Project is about creating two console applications for the client and the server respectively. In Phase 1, you will define the project design,

he Project is about creating two console applications for the client and the server respectively.
 

In Phase 1, you will define the project design, create the TCP connection, and implement the different requirements for communicating commands and chat messages between the clients and the server.

Commands are distinguished from regular chat messages by using the special character $ as a prefix, e.g.

On the server program, you will implement a multiplexing logic designed around managing multiple client I/O. You will also need to reinforce the sending and receiving actions as you respond to the messages sent by the clients.

Phase 1 requirements can be summarized as follows:

  • Prompt the user for the server TCP information (IP and Port)
  • Establish TCP connection (create socket, bind, listen, connect, accept)
  • Implement the server multiplexing using the function select() to manage the IO for the listening and connected sockets.
  • Implement the user registration and chat capacity on the server to limit the number of connected clients
  • Handle the user commands on the server
  • Log all the commands and chat messages communicated to the server in a .txt file.
  • Implement Error check

For Phase I.1, you will be addressing the client multiplexing requirements.

Deliverables of this module (Phase I.1):

  1. Server console that connects multiple clients
  2. Server and Clients can communicate (send/recv)

On the server program, you will implement a multiplexing logic designed around managing multiple client I/O using the select() function. You will also need to reinforce the sending and receiving actions as you respond to the messages sent by the clients.

Instructions:

  • Initialize Client and Server
  • Prompt the user (client) for the server TCP information (IP and Port)
  • Implement the server multiplexing using the function select() to manage the IO for the listening and connected sockets. You could use the spaghetti relay program to test the server multiplexing. Run your chat server console and multiple instances of the spaghetti relay program in client mode. In the port number textbox, add the port you used to bind your server listening socket and connect. Successful connection of the client instances indicates that the multiplexing is working as intended. Note that send and receive between your chat server and spaghetti relay will not work because each relies on a different implementation logic.
     

Commands are distinguished from regular chat messages by using the special character $ as a prefix, e.g. Sregister, $getlist, etc.

Step by Step Solution

3.38 Rating (142 Votes )

There are 3 Steps involved in it

Step: 1

The project involves multiple phases and in Phase 11 the focus is on client multiplexing Here is a highlevel outline of the steps you should follow to ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Programming questions

Question

1 and B are sets of real numbers def A={w|w>1} B={w|w

Answered: 1 week ago