Git Product home page Git Product logo

erl-chat-server's Introduction

What is this?

A simple chat server written in Erlang. It was built with the propose of learn a bit about the language.

How can I run?

Compile: erl -make

Run Erlang VM: erl -pa ebin/

Run chat server: chat_server:start(<PORT>).

How can I interact with the server?

It was defined a communication protocol over TCP. So you can interact with the server sending via TCP known messages.

Protocol

The protocol messages will be described below.

Client to Server

CONNECT:<nick>: Try connection with the server.

SAY:<msg>: Send a public message to the chat room.

PVT:<nick>:<msg>: Send a private message to a specific user.

QUIT:: Disconnect from the server.

Server to Client

CONNECT:OK:<nick1>:<nick2>:(...):<nickN>: Positive response from a CONNECT message sent by client. The online user list is sent in message.

CONNECT:ERROR:<reason>: Negative response from a CONNECT message sent by the client.

PVT:<nick>:<msg>: A private message sent to the client by .

JOIN:<nick>: Notify when someone joined the chat room.

LEFT:<nick>: Notify when someone left the chat room.

References

Here is some helpful references used during the development:

Learn You Some Erlang for Great Good!

A Generic Server Tutorial

A Generalized TCP Server

Erlang Examples: Talk with Sockets

Contributors

Luís Gabriel Lima (luisgabriel)

Rafael Brandão (rafaelbrandao)

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.