Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Objective Getting Started: Familiarize yourself with socket programming.Implement: Develop a simple chat application for message exchange among remote peers. 2. Getting StartedSocket Programming: Beej

1. Objective

Getting Started: Familiarize yourself with socket programming.Implement: Develop a simple chat application for message exchange among remote peers.

2. Getting StartedSocket Programming: Beej Socket Guide: http://beej.us/guide/bgnet

3. Implement

3.1 Programming environment

You will write C/C++ or Java code that compiles in Linux (e.g., Ubuntu) or Windows systemNOTE: You should (1) use TCP Sockets in your peer connection implementation; (2) use the select() API ormulti-threads for handling multiple socket connections; (3) integrate bothclient-side and server side code into one program and run on each peer.

3.2 Running your program

Your process (your program when it is running in memory) will take one command line parameters. The parameter indicates the port on which your process will listen for the incoming connections. For example, if your program is called chat, then you can run it like this: ./chat 4322, where 4322 is the listening port. Run your program on three computers and perform message exchange.

3.3 Functionality of your program

When launched, your process should work like a UNIX shell. It should accept incoming connections and at the same time provide a user interface that will offer the following command options: (Note that specific examples are used for clarity.)

1. help Display information about the available user interface options or command manual.

2. myip Display the IP address of this process.Note:The IP should not be your Local address (127.0.0.1). It should be the actual IP of the computer.

3. myport Display the port on which this process is listening for incoming connections.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions