Java,C++ ,Networking

  
You are required to implement a hybrid P2P chatting application using TCP socket programming. You are allowed to use the following three programming languages: C/C++, Java (Java 8), and Python(3). You code should not be dependent on any development environment. That is, it should be compliable using command prompt (or shell) on Ubuntu (Bash) or MacOS. 
Project Description 
Phase 1 
You are required to build a TCP socket based hybrid P2P chatting application. At the beginning, a server with known IP (use a loopback address/DNS such as localhost) and port number (a fixed one). Then, you will be required to start 5 other clients. For each client, once it is connected to the server, they exchange a greeting message between a newly connected client and the server as well as existing clients. The exact message is “Client $ID: initiated.” Where $ID is the ID of the client. The ID of the client is given when starting the client. That is, you can start a client process by typing
./client.out $ID $PORTNUMBER
Where $ID is the ID of the client and $PORTNUMBER is the port number of the client. As mentioned above, the ID and the Port Number of the server can be hard-coded on the client side. Therefore, you can simply start the server by typing
./server
Now, once you start a server process and 5 client processes, and make them connected, you should be able to use either the server or one of the client to exchange messages among them. That is, a user should be able to type messages on one of them using the terminal, and that message should be broadcasted among them.
Finally, type a message “Exit” on the server. Then, the server should be terminated after a sending a message “Server: terminated.” to all of the clients. This message should be displayed on the screen of each client.
In order to receive 8 points, after the server is terminated, all clients should be able to exchange with each other.
Phase 2 
After the phase 2, you are required to restart the server. Then, each client should restore the connection between them and exchange the follow message between the server and each client (no broadcasting).
That is, “Server: initiated” should be sent to the client first, and this should be displayed on the screen of the client. Then, “Client $ID: reconnected” should be sent to the server, and this should be displayed on the screen of the server. 

superadmin (28431)
New York University
DO YOU HAVE A SIMILAR ASSIGNMENT?

Order Now to Get The Answer

ORDER NOW

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more
Have a homework question? Get help from verified tutors now!

Are you looking for Assignment Help save 10% with this code GEEKS10