Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java program: In this lah you will write a simple chat application in Java using TCP sockets The chat application consists of a chat server

Java program:

image text in transcribed

In this lah you will write a simple chat application in Java using TCP sockets The chat application consists of a chat server and a chat client. At any one time, the chat server is communicating with just one chat client. When the client and the server are done chatting, they exchange end messages which ends the session. The client and server read and write Unicode strings using the geadTEO and wrteUTEO methods of DataInputStream and DataQutputStream respectively After compilation, start the Chat server and then the Chat client in two separate command windows on the localhost. Let the client and server exchange a couple of messages from their respective windows and then end the session by exchanging the end message rovide your server and client code as well as the message exchanges (screenshots of server and client command windows) to Blackboard. Desktop-bash-45x3 E C020K1NSG8WL:Desktop yunm$ java ChatServer Client: hi WHat's up? Client: Testing my chat program Your chat program works well! Client: Great. Then I will submit my lab. 0K. Have fun! The session ended. C820K1NSG8WL: Desktop yunms I Desktop-bash-45x11 E C020K1NSG8WL: Desktop yunm$ java ChatClient Server: Hello! This is a char server. hi~ Server: WHat's up? Testing my chat program Server: Your chat program works well! Great. Then I will submit my lab. Server: 0K. Have fun! end C020K1NSG8WL : Desktop yunm$ []

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL/PHP Database Applications

Authors: Jay Greenspan, Brad Bulger

1st Edition

978-0764535376

More Books

Students also viewed these Databases questions