Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between echo-server and client-server chat application in java?

Also I want to know what is main difference between Single Threaded and MultiThreaded Client-Server? I want to create a client server chat application.

Server Form consist: 1 Textarea(text area) (to display text) 1 sendarea(text area) (to type the text to send) 1 Send button (to send the text which is typed in sendarea) it sends to client 1 exit button (closes application)

Client Form consist: 1 Textarea(text area) (to display text) 1 sendarea(text area) (to type the text to send) 1 Send button (to send the text which is typed in sendarea) it sends to server 1 exit button (closes application)

like image 493
Andy Avatar asked Jul 02 '26 07:07

Andy


1 Answers

Single threads means 1 thread. Multi threading means multiple threads. What this means in term of your chat server is:

If you have a single threaded server only 1 connection can be made to the server. Multithreading will allow you to create a new thread each time a new chat client connects and issue its own Input/output stream to send and receive chat messages.

An echo server will just echo messages back from the 1 client connected where as a chat server will allow you to broadcast messages to other users and allow them to send messages to your client.

like image 74
Darren Avatar answered Jul 04 '26 20:07

Darren