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

  Cross the dark knight and the living flame of love

What challenges does spain get from the text john of the cross the dark knight and the living flame of love?

  Rogram that will accept input and then display values

The program should continue as long as the user enters any values, even if only spaces are entered. Figure 9-49 (attached to post) displays sample output from the program.

  Method summarizesequences that takes a string as a parameter

Now implement the method summarizeSequences that takes a String as a parameter. This method should open the file named by this String, and read a sequence from that file into an array list using the getSequence method you wrote above

  Explain tostring methods in java

Add an instance variable, named department, of type String. Supply a method toString that prints the manager's name,department, and salary. Make a class Executive inherit from Manager.

  Explain error and exception and how jsp handles them

Explain error and exception and how JSP handles them. Discuss in detail JSP Life cycle. Use diagram. Create a JSP program for Loan Calculator. It calculates both Simple and Compound interest.

  Create a java application using swing components

Create a java application using Swing Components. The java program should consist of showing values of cars depending upon the year and model selections, for a vehicle.

  What do you mean by nested inner class what special

q1. what is a nested inner class? what special privileges does a nested inner class have? give an example of how you

  There are different ways you can use virtulazation one

write a 200- to 300-word short-answer response to the following there are different ways you can use virtulazation. one

  Define multiple classes via inheritance

Your task for this assignment is to define multiple classes via inheritance. Your classes should implement various "snacks" including "M&Ms", "Popcorn", etc.

  Allow the user to display a work history report

The 'report screen' shall:Allow the user to display a work history report for an individual or for all employees for the two weeks prior to the report request.

  Create a secure parts inventory catalog system

You will create a secure Parts Inventory Catalog system using Model 2 architecture. The application will require a user to have the proper access right to enter the system, and when satisfied, presents the catalog of items currently available in t..

  Problem related to eclips

Goals: 1) Be able to work with individual bits in java. 2) Understand the serializable interface. 3) Understand the comparable interface.

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