Code Monkey home page Code Monkey logo

simple-chat's Introduction

Simple Chat Server

A simple chat server for a school assignment

Requirements found here: http://www.hcitang.org/uploads/Teaching/CPSC599W2015A1.html

Server1.js

To use:

  • Run node server1.js in a terminal
  • Run telnet localhost 8113 in another terminal (one terminal using telnet = one connection)
  • For each client connected, type and your messages will be sent to the server

Server2.js

To use:

  • Run node server2.js in a terminal
  • Run telnet localhost 8113 in another terminal (one terminal using telnet = one connection)
  • The first string entered is the client's desired username
  • All messages afterwards will be sent to the server

Server3.js

  • Run node server3.js in a terminal - can add additional fields (see Calling Conventions)
  • Run telnet localhost 8113 in another terminal (one terminal using telnet = one connection)

###Calling Conventions: -l <num> or --log-level=<num> indicates level of logging mechanism

  • This is optional, where the default is 0 and no logging occurs
  • Level 1: Logs only messages with the following format: [date-time] MESSAGE: [username]: [message]
  • Level 2: Logs also the connections and disconnects from the clients: [date-time] [CONNECT/DISCONNECT]: [IP]:[port]

-f <filename.extension> or --file=<filename.extension> logs to a file based on level of logging mechanism

  • Use extension .txt for a nicely formatted file

Server4.js

  • Run node server4.js in a terminal - can add additional fields (see Calling Conventions)
  • Run node elizaclient.js or node elizaclient2.js

ElizaServer.js

  • Run node elizaserver.js in a terminal - can add additional fields (see Calling Conventions)
    • Run telnet localhost 8113 in another terminal (one terminal using telnet = one connection)

simple-chat's People

Contributors

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