[+] TODOs

[+] exmples dir
This commit is contained in:
2025-03-12 14:40:04 +03:00
parent ab06266681
commit 8f16c2e113

View File

@@ -1,12 +1,23 @@
# winConnect (Windows Only)
Communication Client->Daemon via NamedPipe
## ToDo:
- [x] Add support for other header settings
- [ ] Add logging
- [x] Add support for safe closing
- [ ] Add support for multiple clients
- [ ] Particular client to client communication
- [ ] Add support for encryption
## Description
This is a simple client-server communication system for Windows. The client and server communicate via a named pipe. The client sends a message to the server, and the server responds with a message. The client and server can be run on the same machine or on different machines.
## Usage
You can find examples in the [examples](examples) directory.
### Server
The server is a daemon that listens for incoming messages from clients. The server can be run on the same machine as the client or on a different machine. To run the server, use the following command:
@@ -14,11 +25,12 @@ The server is a daemon that listens for incoming messages from clients. The serv
```python
from winConnect import WinConnectDaemon
connector = WinConnectDaemon('test')
connector.set_header_settings(">L", 32)
connector = WinConnectDaemon('test') # test - name of the pipe
for data in connector.listen():
print(data)
print(f"({type(data)}) {data=}")
if data is None and connector.closed:
break
connector.send_data(data)
```
@@ -31,19 +43,25 @@ from winConnect import WinConnectClient
connector = WinConnectClient('test')
for data in connector.listen():
print(data)
i = input(":> ")
connector.send_data(i)
with connector as conn:
while True:
i = input(":> ")
if i == "exit": break
conn.send_data(i)
print(conn.read_pipe())
```
## Installation
[//]: # (## Installation)
To install the package, use the following command:
[//]: # ()
[//]: # (To install the package, use the following command:)
```bash
pip install winConnect
```
[//]: # ()
[//]: # (```bash)
[//]: # (pip install winConnect)
[//]: # (```)
## License