Write a java tcp socket program to do tcpsocket server

Assignment Help JAVA Programming
Reference no: EM131235999

For this assignment, reference the source codes in the attached slides.

a) Write a Java TCP socket program to do the following:

TCPSocket server

a. When starts the server, IP address of the machine must be displayed so the client can use to connect

b. You need tospecify the port number internally (you may hard code the port number in the client program as well)

c. The server must sends "Hi client!"to the client when the socket is successfully created.

d. When a client sends a message, the server must convert that into all upper case message, e.g., "test" from the client must be converted into "TEST", and displayed

TCPSocket client

a. To run the client program, the IP address of the server must be used, e.g. "java TCPClient 100.120.120.120" or alternately GUI can be used to enter the server's IP address.

b. When the socket is successfully created, the message from the server must be displayed, e.g., "Hi client!"

c. When lower case input text is sent to the server, the upper case version of the text must be displayed.

d. To discontinue, type "END".

b) Write a Java UDP socket program to do the following:

a. Allow the user to input a file name of a small Word file that the client wants. Then the server reads the file name and sends the file to the client.

b. The client writes the received contents to a file.

c. Allow the user to enter output file name the client created. (different file name but the same contents)

d. Verify the received file can be opened using the Word

Now please do the following:

- When testing the program, you must use two machines - one for the server and the other for client.

So run the server program using your laptop/desktop machine.

1. Start Wireshark
2. Start server program from one machine
3. Start client program from the other machine
4. Exchange a few messages and stop the program
5. Stop the Wireshark and examine the captured packets - you can do so by tracing the IP addresses of the captured packets.
6. Make sure that you have captured TCP packets (or UDP packets in case of UDP program).
7. Take screen shots of the captured packets

** Repeat 1 ~ 7 for UDP program. In the UDP program, use file name instead of messages.

Deliverable

- Well commented source code and executable module (either jar or class file)

o Each socket API must be described in the source code

- Readme files (one for TCP and the other for UDP) that illustrates how to set up, compile, how to run your program

o The stated functionalities must be implemented in your program.

- The screenshot from the Wireshark must be included in the report.

o Draw the headers for the captured packets (one UDP packet and one TCP packet) and explain each field in the headers

| Ethernet Header | IP header | TCP or UDP header | data |

Reference no: EM131235999

Questions Cloud

What might be each company negotiating interests : In negotiations between an international company and a small company in a developing country to set up an international joint venture, what might be each company's negotiating interests? What are some likely conflicts that will arise during negot..
What is the value of the swap to the party paying dollars : All interest rates are quoted with annual compounding. The current exchange rate is 1.8500. What is the value of the swap to the party paying sterling? What is the value of the swap to the party paying dollars?
Write a comprehensive report on the federal reserve system : Write a comprehensive report on the Federal Reserve System: Origin, Structure, History, Mission and Success (positive/negative?).....and it's impact on the current economic situation
Consider the standard deviation in interarrival : The number of cars passing a checkpoint is treated by a consulting firm as having a poisson distribution with a mean of 20 per minute. What does the firm consider the standard deviation in interarrival times to be?
Write a java tcp socket program to do tcpsocket server : Write a Java TCP socket program to do TCPSocket server. When starts the server, IP address of the machine must be displayed so the client can use to connect.
Difference between the credit risk and the market risk : Explain the difference between the credit risk and the market risk in a financial contract. - What has the treasurer overlooked?
Write a paper of two to four pages detailing the dmadv steps : Write a paper of two to four pages detailing the DMADV steps for designing a new product/process at your firm. Your approach to designing the new product/process at your firm should be similar to that in this case study. Cite your sources in the A..
Consider the standard deviation in interarrival : The number of cars passing a checkpoint is treated by a consulting firm as having a poisson distribution with a mean of 20 per minute. What does the firm consider the standard deviation in interarrival times to be?
Explain how society expectations affect the business : Since week one you have been reading about the changes between leaders in the 20th Century and the 21st Century. Create a list of five expectations that society has for business leaders from each of these two centuries. Reflect on your reading for ..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd