he Project is about creating two console applications for the client and the server respectively. In
Question:
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.
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):
- Server console that connects multiple clients
- 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.
Modern Database Management
ISBN: 978-0133544619
12th edition
Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi