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
Get Avast Free Antivirus | Your top-rated shield against malware and online scams Icon
Get Avast Free Antivirus | Your top-rated shield against malware and online scams

Boost your PC's defense against cyberthreats and web-based scams.

Our antivirus software scans for security and performance issues and helps you to fix them instantly. It also protects you in real time by analyzing unknown files before they reach your desktop PC or laptop — all for free.
Free Download
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