A simple chat server written in Erlang.
Switch branches/tags
Nothing to show
Latest commit fcc972f Dec 18, 2011 @luisgabriel Moving chat client to a separate repository
Signed-off-by: Luis Gabriel Lima <lampih@gmail.com>


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.


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.


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


Luís Gabriel Lima (luisgabriel)

Rafael Brandão (rafaelbrandao)