Coder Social home page Coder Social logo

ankitthakur00 / chat-socket Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sontx/chat-socket

0.0 0.0 0.0 4.01 MB

A simple chat room using java socket with the client-server paradigm

License: MIT License

Java 99.00% Batchfile 0.05% Shell 0.08% CSS 0.87%

chat-socket's Introduction

Gitter chat

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, multi-threading, JavaFx, Java Swing, Java serialization, and JSON.

Prerequisites

To compile this project, you need to install these things:

Installing

Build (binary file will be placed in target directory):

mvn clean compile assembly:single

Run (will ask you for working mode):

mvn exec:java

Usage

Both server and client are in chatsocket-x.y-SNAPSHOT-jar-with-dependencies.jar (to get this jar file you need to build this project).

  1. Server app: java -jar chatsocket.jar --mode=server
  2. Client app: java -jar chatsocket.jar --mode=client

App settings will be saved in app.json file

{
  "modified" : 1580791811962,
  "settings" : [ {
    "key" : "client",
    "data" : {
      "serverIp" : "127.0.0.1",
      "serverPort" : 3393,
      "loggedUserName" : "sontx"
    }
  }, {
    "key" : "server",
    "data" : {
      "ip" : "127.0.0.1",
      "port" : 3393
    }
  } ]
}

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.

[ {
  "id" : "7453f7f5105547179f0845cd03fe4eda",
  "username" : "sontx",
  "passwordHash" : "7c4a8d09ca3762af61e59520943dc26494f8941b",
  "profile" : {
    "displayName" : "Tran Xuan Son",
    "status" : "I'm just a beginner"
  }
} ]

Client

  1. Connect to the server.

  1. Then login with your account

  1. Or register a new one.

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

  1. To update your userProfile, 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:

License

MIT

chat-socket's People

Contributors

sontx avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.