Question
Create PING Server and Client using UDP Protocol in JAVA. In this assignment, you will learn the basics of socket programming for UDP using Java.
Create PING Server and Client using UDP Protocol in JAVA. In this assignment, you will learn the basics of socket programming for UDP using Java. You will learn how to send and receive datagram packets using UDP sockets.
The client should allows user to send a message to the server. Server should respond back with the message received prefixed with timestamp in [MMDDYYYY hh:mm:ss] format. As UDP is an unreliable protocol, a packet sent from the client to the server may be lost in the network, or vice versa. For this reason, the client cannot wait indefinitely for a reply to a ping message. You should get the client wait up to 3 seconds for a reply; if no reply is received within 3 seconds, your client program should assume that the packet was lost during transmission across the network. You will need to look up Java documentation to find out how to set the timeout value on a datagram socket.
You application could use command line for input, or use a Graphical User Interface.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started