Giter Site home page Giter Site logo

aditya30394 / geeky-whatsapp Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 1.0 332 KB

A multithreaded client-server architecture based Chat Application using Java Socket programming. A server continuously listens for connection requests from clients across the network or even from the same machine. Clients connect to the server using an IP address and port number. The client needs to provide a unique username while connecting to the server. This username is treated as the unique identifier for that client.

License: MIT License

Java 100.00%
java

geeky-whatsapp's Introduction

Geeky-Whatsapp

A multithreaded client-server architecture based Chat Application using Java Socket programming. A server continuously listens for connection requests from clients across the network or even from the same machine. Clients connect to the server using an IP address and port number. The client needs to provide a unique username while connecting to the server. This username is treated as the unique identifier for that client.

All the messages from the client are sent to the server using ObjectOutputStream in java. After receiving the message from the client, the server broadcasts the message if it is not a private message. And if it is a private message, which is detected using โ€˜@โ€™ followed by a valid username, sends the message only to that user.

All the messages sent from various clients can be seen on the server console.

Instructions

To compile the Programs

javac ChatServer.java
javac ChatClient.java

Server

To start the server

java ChatServer
java ChatServer [portNumber]

If the port number is not specified, port 5000 is used by default

Starting the Chat Server

Client

To start the Client in console mode use one of the following command

java ChatClient username
java ChatClient username portNumber
java ChatClient username portNumber serverAddress

At the console prompt

  • If the portNumber is not specified 5000 is used
  • If the serverAddress is not specified "localHost" is used

Starting the Chat Client

Chat

On the client console:

  1. Simply type the message to send broadcast to all the active users
  2. Type '@usernameyourmessage' without quotes to send message to desired client
  3. Type 'GETUSERS' without quotes to see list of active clients
  4. Type 'SIGNOUT' without quotes to logoff from server

Screenshots

In the screenshots below, three clents namely "Aditya", "Abhishek" and "Himanshu" are active on the chat server.

Console of the Chat Server

Console of user Aditya

Console of user Abhishek

Console of user Himanshu

License

This project is licensed under the MIT License - see the LICENSE file for details

geeky-whatsapp's People

Contributors

aditya30394 avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

shadabkhan7253

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.