-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
37 lines (33 loc) · 1.11 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
TODO:
- GUI
- Check if name is available
- Url functions: urlencode, urldecode
- Better data records (received message, composed message)
Also put records to header file(s)
- Definitions to header file?
- Makefile
- Request handling
Handle sendmessage
Handle findname
Handle sendname
Handle sendnames (using json list [["name","ip:port"],["name2","ip2:port2"]])
- Send message to another peer (using erlang http client BIF)
sendmessage
findname
sendname
sendnames
- sendmessage functions
send_message(Txt, To) To = ["Name","IP"]
send_message(#composed_message)
...
Simple P2P chat
- Uses HTTP protocol
- Uses GET method
sendmessage (from another peer)
http://peer:port/chat/sendmessage?message=&myname=&myip=
findname
http://peer:port/chat/findname?name=&myname=&myip=&ttl=
asknames (sends names back via same socket)
http://peer:port/chat/asknames?ttl=
sendname (send my name to other peer OR peer from my json file)
http://peer:port/chat/sendname?name&ip=&ttl=