Giter VIP home page Giter VIP logo

takehome1's Introduction

Simple Telnet like chat application

A simple Chat application where Chat clients can communicate with each other by connecting to server and sending message to all connected users.

Components

Server

  • Should accept new client request
  • Should distinguish between Client-A and Client-B
  • Upon receiving message from Client-A, it should send message to all connected clients except Client-A

Client

  • Can send message to all the users
  • Can change display name
  • Can gracefully Quit

Building Application

  1. make deps
  2. go generate ./...
  3. make

Running Application

Server

  • To run server on a given port
./server -port=14000
  • To run server on a given port with logs to stdout
./server -port=14000 -stderrthreshold=INFO -v=9

Client

  • To connect client to server
./client -server=localhost -port=14000 -username=user1
  • To connect client to server with logs to stdout
./client -server=localhost -port=14000 -username=user1 -stderrthreshold=INFO -v=9

Help

  • ./client --help and ./server --help should display valid arguments and their usage
  • At any time in Client application you can get help about commands by typing HELP
./client -username=user1 -server=localhost -port=14000
I0117 22:05:34.729454   25763 chatclient.go:28] Init

  Chat client connected to server...

  Type HELP to display help message

user1 # help

  Valid commands:
  HELP: print help message
  NICK <NEW_NAME>: change your username
  SEND <MESSAGE>: send message
  QUIT: disconnect from the server

takehome1's People

Contributors

pavanpalaksha avatar

Watchers

 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.