Browse Source

- Updated README.md

Parad0x 6 years ago
parent
commit
c76d252c6b
1 changed files with 42 additions and 10 deletions
  1. 42 10
      README.md

+ 42 - 10
README.md

@@ -1,26 +1,58 @@
 # Totify
 # Totify
 
 
-## Dev tools
+Simple communication bridge between clients and telegram. Using sockets is simple way for other clients to send notification. Current version support only one way communication (from client to telegram) but it should be possible to implement registering command. Protocol is based on queue where elements are separated with semicolons. 
 
 
-* Typescript
-* Nodemon
+## Protocol's Operators
 
 
-## Scripts
+### register
+Reply with "\<id\>&\<auth\>"
 
 
-### start
+```
+register;
+```
+
+### login (authcode)
+Reply with OK on success or ERR with message;
+```
+login;PIZS-4681-bKUp-2154;
+```
+
+### notify (msg)
+Need authentication
+Reply with OK on success or ERR with message;
+```
+notify; test notification;
+```
 
 
+### ping
+Reply with pong
 ```
 ```
-node src/index.js
+ping;
 ```
 ```
 
 
-### startDev
+### close
+Reply with closing message and close server connection
+```
+close;
+```
 
 
+## Sample Comunication
 ```
 ```
-nodemon src/index.js
+Server in: register;close;
+Server out: 5&GSFBT-665-oJDDKqerYCWwfmtFWOOD;
 ```
 ```
 
 
-### build
+```
+Server in: login;EDSPG-466-VlyoDV9i6mBOAwle0hZU;ping;notify;Test;close;
+Server out: OK;pong;OK;Closing connection;
+```
 
 
 ```
 ```
-tsc
+Server in: login;invalid-code;
+Server out: ERR;auth unmatched or not activated;
+```
+
 ```
 ```
+Server in: notify;notify without login;
+Server out: ERR;need to be logged;
+```