chat-socket

A simple chat application includes chat client and chat server. Support multiple users, private chat, and personal status. This project is based on TCP socket, multithreading, Java serialization, and JSON.

chat-socket is a simple chat application includes chat client and chat server. Support multiple users, private chat, and personal status. This project is based on TCP socket, multithreading, Java serialization, and JSON.

Installation

Download the binary file or clone this project and use your favorite IDE to customize then rebuild by:

  1. Run install.bat in scripts folder.
  2. mvn clean compile assembly:single (the binary file will be placed in target folder)

This project requires jdk 1.8 or later.

Usage

Both server and client are in homechat.jar.

  1. Server app: run server.bat/server.sh or java -jar homechat.jar --mode=server
  2. Client app: run client.bat/client.sh or java -jar homechat.jar --mode=client

Server

The server needs to listen to an IP and a port number, other clients will connect to this address. Fill up these boxes and click on Start button to start the server.

All users data will be saved in user.json file.

Client

  1. Connect to the server.

  1. Login to the system.

  1. Or register a new account.

  1. Other users will be shown in your friend list.

  1. To update your profile, double-click to the avatar.

  1. Double-click to any online friend to chat

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Dependencies

Author

Developed by sontx/noem, some useful information:

License

MIT

Source

https://github.com/sontx/chat-socket


Copyright © 2022. All rights reserved.