60 likes | 142 Vues
OutVoice instant messenger. Goals. Develop a simple text chat protocol which will provide: public messaging, deliver to all on the server; private messaging, deliver to the specified client; nickname system; server management, i.e. kicking ‘bad’ guys;
E N D
Goals • Develop a simple text chat protocol which will provide: • public messaging, deliver to all on the server; • private messaging, deliver to the specified client; • nickname system; • server management, i.e. kicking ‘bad’ guys; • periodical connection checking, ping-pong exchange. • Implement both its server and client sidesusing c++ programming language and its features from latest standard, c++11.
The protocol, OutVoice IM • Protocol uses verbs for main actions and their past form for server replies, e.g. SHOUT becomes SHOUTED; • Main commands: • SHOUT/SHOUTED; • WHISPER/WHISPERED; • TAKENICK/TOOKNICK; • QUIT/QUITED.
Events flow • Each client hangs on its socket and listens to it; • If a message arrives,the client creates Eventobject and passes itto the EventsQueue; • Server’s auxiliary thread, processEvent, getsthe Event and acts accordingly, e.g. sends message for all on the server.
Clients • Main client is written on c++ programming language and uses FLTK toolkit as GUI framework; • Also there were writtena pair of bots using python3: • the weather bot uses openweather API, JSON; • the calc bot useswolfram API, XML.
Tools • Wireshark enables developers to write dissectors for their custom protocols using Lua 5.2;