-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,50 @@ | ||
Decentralized P2P python based chat app w/ Rooms!! | ||
# PyDecentralizedChat | ||
|
||
Fundemantal ideas of project: Every Node keeps a copy of all the chat rooms they create or join in an instance, and whatever rooms someone who points to them as a peer creates, | ||
Decentralized P2P python based chat app w/ Rooms!! | ||
|
||
If everyone leaves a room, as in there is no active connections to the room at any given moment, the room is deleted, so, only active rooms are passed on to future nodes. | ||
Fundemantal ideas of project: | ||
Every Node keeps a copy of all the chat rooms they create or join in an instance, and whatever rooms someone who points to them as a peer creates, | ||
|
||
If everyone leaves a room, as in there is no active connections to the room at any given moment, the room is deleted, so, only active rooms are passed on to future nodes. | ||
|
||
|
||
Upcoming updates: | ||
1. autoamtic node finding, for now if the original peer you pointed to goes down you must manually restart and connect to a live node. | ||
2. fancier cli | ||
|
||
autoamtic node finding, for now if the original peer you pointed to goes down you must manually restart and connect to a live node. | ||
fancier cli | ||
How to Use: | ||
|
||
Clone Repo and ensure you're using python 3.6+ | ||
python client.py enter in your peers ip and port | ||
To run Server: 3. python server.py | ||
1. Clone Repo and ensure you're using python 3.6+ | ||
2. `python client.py` enter in your peers ip and port | ||
|
||
[IP TO BIND SERVER INSTANCE] >>> will instiantiate a server, you will then enter your local ipv4(further details below), or whatever IP you wish to bind the server to and your port , just ensure you have the proper permissions, for local tests, just hit enter and it will automatically use your host address. | ||
[PEER INFO] | ||
|
||
[IP] >>> | ||
To run Server: | ||
3. `python server.py` | ||
|
||
[PORT] >>> | ||
|
||
The IP and port of your peer. If youre node you have two options: | ||
5. `[IP TO BIND SERVER INSTANCE] >>> ` will instiantiate a server, you will then enter your local ipv4(further details below), or whatever IP you wish to bind the server to and your port , just ensure you have the proper permissions, for local tests, just hit enter and it will automatically use your host address. | ||
|
||
Sync with another node that already has room and recieve thier chat logs when you enter a room created on thier server | ||
Sync with yourself by leaving blank and create your own instance | ||
|
||
`[PEER INFO]` | ||
|
||
`[IP] >>>` | ||
|
||
`[PORT] >>>` | ||
|
||
The IP and port of your peer. If youre node you have two options: | ||
|
||
1. Sync with another node that already has room and recieve thier chat logs when you enter a room created on thier server | ||
2. Sync with yourself by leaving blank and create your own instance | ||
|
||
Please note: | ||
|
||
You cannot point towards each other for instance, if Person A has Person B as a peer, Person B cannot have Person A as their peer. | ||
|
||
Commands : | ||
|
||
Commands : | ||
|
||
!R will give you a prompt to enter a new room ID, it will then change your room. !D will disconnect your client from the peer. | ||
`!R` will give you a prompt to enter a new room ID, it will then change your room. | ||
`!D` will disconnect your client from the peer. | ||
|
||
Note: Rooms ids can be up to a 64 byte number long | ||
|
||
(thats alot of combos) | ||
(thats alot of combos) |