This project is a demonstration example on multi-threading programming in Java (old school) and network programming (String exchanges over network).
The multi-threading part aims to show how to avoid blocking methods by putting them in separate thread, therefor, the ExecutorService was not used. Two Runnable interfaces are available in the server and the client to show how the dialog is managed.
The Socket part aims to show how simple communication using TCP/IP are quite simple. The system shows how to exchange and process String over network. This is not sufficient when talking about large applications, but, let's not forget that HTTP uses Strings.
The project contains both the Server and the Client. The main method in the Main class does nothing. You must launch the Server (ServerMain) and several instances (or just one) of the Client (ClientMain).
To deconnect a client just send "exit".

Features

  • Multi-threading
  • Socket programming
  • Chat system
  • Broadcast approach

Project Activity

See All Activity >

Categories

Chat, Admin Templates

License

GNU Library or Lesser General Public License version 3.0 (LGPLv3)

Follow Simple Client Server Chat Example

Simple Client Server Chat Example Web Site

Other Useful Business Software
Powering the best of the internet | Fastly Icon
Powering the best of the internet | Fastly

Fastly's edge cloud platform delivers faster, safer, and more scalable sites and apps to customers.

Ensure your websites, applications and services can effortlessly handle the demands of your users with Fastly. Fastly’s portfolio is designed to be highly performant, personalized and secure while seamlessly scaling to support your growth.
Try for free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Simple Client Server Chat Example!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Intended Audience

Developers, Other Audience

User Interface

Non-interactive (Daemon), Console/Terminal

Programming Language

Java

Related Categories

Java Chat Software, Java Admin Templates

Registered

2018-05-09