From the course: WebSocket Programming with Java EE
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
✓ Challenge: Ping/pong endpoint
From the course: WebSocket Programming with Java EE
✓ Challenge: Ping/pong endpoint
(whooshing) - [Instructor] Your challenge is to code a simple ping/pong client and server. This challenge can be broken down into two parts. The first part is for the client to send a pong message to a WebSocket endpoint, and for the server to print a logout confirming the pong message has been received. Second part is for the client to send a ping message to the WebSocket endpoint, and for the client endpoint to receive the corresponding pong message from the server. It should print a message to the console that confirms its receipt. And to simplify the task, I suggest that you create a server and a client using the Tyrus Project. A sticking point for the second part is that you must realize that the server does not have a method for handling a ping message. It will automatically respond with a pong message. This challenge should not take any longer than 30 minutes.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.