Giter VIP home page Giter VIP logo

netchat-java's Introduction

NetChat-java

Console application which allows to communicate with other users in LAN. It is my first contact with java sockets and low-level APIs dealing with synchronization of threads.

Usage

Application has two modes server and client, the former of which has to be launched before client.

To run application use the following: java App server/client port (address)

example: java App client 8001 127.0.0.1

The address is optional. Without that parameter application uses your loop back address:

  private static InetAddress address = InetAddress.getLoopbackAddress();

After connecting to the server user is asked to register by stating his/hers name. It has to be unique, sorry!

The next step is choosing the receiver of your message and off you go!

There are some special commands that help you use tha chat:

/set - used to change receiver of ur messages

/clients - used to get list of registered users

Requirements:

  • Command signature should look in a following way: java App mode port [address]
  • Application should have to modes: client, server.
  • Application should allow bi-directional communication between server and client.
  • Application should use TCP protocol.
  • Communication should be done through exchanging Message objects not Strings.
  • Application should use serialization
  • When a client disconnects from a server, server should wait for the next client.
  • When a server disconnects, client should be turned off gracefully.

(Possibly) Future tasks:

  • Implement disconnecting
  • Write tests
  • Write javadocs

netchat-java's People

Contributors

pieczkowski avatar

Watchers

 avatar

Forkers

banglue

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.