A simple chat server written in Erlang. It was built with the propose of learn a bit about the language.
Compile: erl -make
Run Erlang VM: erl -pa ebin/
Run chat server: chat_server:start(<PORT>).
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.
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.
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!
Erlang Examples: Talk with Sockets
Luís Gabriel Lima (luisgabriel)
Rafael Brandão (rafaelbrandao)