Add CLI run options, update README

This commit is contained in:
mirai
2023-11-27 06:50:16 +03:00
parent 8c4799c634
commit c5fa982f65
7 changed files with 76 additions and 25 deletions
+36 -3
View File
@@ -23,11 +23,39 @@ import asyncio
import cmd_chat
if __name__ == '__main__':
asyncio.run(
cmd_chat.run()
)
asyncio.run(cmd_chat.run())
```
### Or (Windows)
Start server:
```
.\cmd_chat.bat serve localhost 5000
```
Connect to server:
```
.\cmd_chat.bat connect localhost 5000 tyler
```
### Or (Linux)
Start server:
```
python3 cmd_chat.py serve localhost 5000
```
Connect to server:
```
python3 cmd_chat.py connect localhost 5000 tyler
```
How does encryption work?
* The client generates a private key.
@@ -40,3 +68,8 @@ How does encryption work?
# Example
![Alt Text](example.gif)
# Known bugs
* Sometime WS just drop connection
* Client input message problem. To start input, you need to press enter first, only after that you got pop up with message. Tried to fix, but nothing worked.