CHAT

TXT PROTO

The implementation of TXT CHAT protocol is trying to be informative but not excessive, it should take care of run-time edge cases but not too stable. TXT protocol is dedicated for demo purposes and doesn't support file upload and voice calls.

$ wscat -c wss://n2o.im > HELP < N2O <user> | SEND <user> <msg> | BOX | CUT <id>. > N2O maxim < USER maxim > SEND vlad HELO < ERROR user doesn't exist. > N2O vlad < USER vlad > SEND maxim OK < NOTIFY vlad:maxim:1556151953113322286:OK < ACK "1556151953113322286" > N2O maxim < USER maxim > BOX < LIST vlad:maxim:1556151953113322286:OK > SEND maxim this is me < NOTIFY maxim:maxim:1556152151055371152:this is me < ACK "1556152151055371152" > SEND maxim back again < NOTIFY maxim:maxim:1556152157283311935:back again < ACK "1556152157283311935" > BOX < LIST vlad:maxim:1556151953113322286:OK maxim:maxim:1556152151055371152:this is me maxim:maxim:1556152157283311935:back again > CUT 1556152157283311935 < ERASED 3 > BOX < LIST >

BER ASN.1 PROTO

ROSTER DEFINITIONS IMPLICIT TAGS ::= BEGIN P2P ::= SEQUENCE { dst OCTET STRING } MUC ::= SEQUENCE { dst OCTET STRING } Adr ::= SEQUENCE { src OCTET STRING, dst CHOICE { muc [0] MUC, p2p [1] P2P } } Pub ::= SEQUENCE { key OCTET STRING, adr Adr, tag OCTET STRING, bin OCTET STRING } Sub ::= SEQUENCE { key OCTET STRING, adr Adr } Cut ::= SEQUENCE { id OCTET STRING } N2O ::= SEQUENCE { tok OCTET STRING } Ack ::= SEQUENCE { lex OCTET STRING } Nak ::= SEQUENCE { key OCTET STRING } Msg ::= CHOICE { n2o [0] N2O, ack [1] Ack, nak [2] Nak, pub [3] Pub, sub [4] Sub, cut [5] Cut } END

CHAT is written in Erlang/OTP and supports RocksDB or Mnesia databases.

APP SPEC

GUI.PDF