GithubHelp home page GithubHelp logo

tcp-chat's Introduction

TCP-chat

This is a TCP chat server.
Clients can access it via telnet.
Since this is part of a school assignment, I'll be explaining every file in the project.

This is a fork from plutov's repo so, if you are interested please check it out.

The command object

It defines the value of the commands that the client will use to asign it later in the client object.

The client object

Defines the parameters that the user can interact with, like the nickname, the room the client will be connecting to or the commands the user can send to the server. In the readInput function, we "glue" the input command with it's function sending it through a channel to the server. Also, the msg and err function are written here.

The room object

It defines a room as the name of the room and the members connected there. The broadcast function is also defined here.

The server object

This file defines the server as the rooms on that server and the commands sent to it. In here is written how the server should serve the clients and the functions of the commands are defined.

tcp-chat's People

Contributors

alebozek 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.