Skip to content

roby-boy/erl-chat-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Chat Server

Simple chat server on port 7000
An Erlang/OTP 22 application
Rebar3 project

Build & Launch

By rebar3 shell
rebar3 shell

By rebar3 release

rebar3 release
./_build/default/rel/chat_server/bin/chat_server foreground

Client Commands

Telnet can be used to chat with the server

Below the available commands (I hope they are self explicative)

<<user,setname>>{username}
<<user,whoami>>
<<user,list>>
<<msg,{username}>>{textmsg}
<<room,list>>
<<room,create>>{roomname}
<<room,delete>>{roomname}
<<room,userlist>>{roomname}
<<room,join>>{roomname}
<<room,leave>>{roomname}
<<room,msg,{roomname}>>{textmsg}
<<room,belong>>
regex for name user / room: [a-zA-Z0-9]{3,}

Note: as soon as you connect to the server, you have to setname, otherwise the all other commands will be forbidden

Chat responses:
if the command sent if not present in the list, server responds with the same text sent;
if the command is correct, the answer is "ok" for PUT / DELETE / UPDATE request (ex <<user,setname>>{name}), otherwise arbitrary data for GET request (ex <<user,list>>)

About

simple chat server

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages