Communicate Client-Server via Windows NamedPipe.
Project description
winConnect
Communicate Client-Server via Windows NamedPipe
ToDo:
- Add support for sending and receiving data (0.1.0)
- Add support for safe closing (0.9.0)
- Add support for other header settings (0.9.0)
- Add logging (0.9.1)
- Send data in chunks (if data is too large) (0.9.3)
- Add support for encryption (0.9.2)
- simple (via char xor'ing; auto-pairing)
- password (via AES and PBKDF2)
- certificate (via RSA)
- Add support for multiple clients
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.
Installation
To install the package, use the following command:
pip install winConnect
Usage
You can find examples in the 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:
from winConnect import WinConnectDaemon
connector = WinConnectDaemon('test') # test - name of the pipe
for data in connector.listen():
print(f"({type(data)}) {data=}")
if data is None and connector.closed:
break
connector.send_data(data)
Client
The client sends a message to the server and waits for a response. To run the client, use the following command:
from winConnect import WinConnectClient
connector = WinConnectClient('test')
with connector as conn:
while True:
i = input(":> ")
if i == "exit": break
conn.send_data(i)
print(conn.read_pipe())
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file winconnect-0.9.2.tar.gz.
File metadata
- Download URL: winconnect-0.9.2.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f40044c52d56b6e5f956cd85d27a381ead935e8efb7dc19efa6f41eb546111e2
|
|
| MD5 |
4e24f066e048f0866fb8ba8b033c4fd8
|
|
| BLAKE2b-256 |
901c6212e909a591a299d035a53b8b781b52cae6b29637b3f577fd96fddcd333
|
File details
Details for the file winconnect-0.9.2-py3-none-any.whl.
File metadata
- Download URL: winconnect-0.9.2-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6191b8a807bc6559c7b7322c08dbc12ea1fda7c088c48b34d94223a80df1e10f
|
|
| MD5 |
0a7e2335b1af986f44996e9684aa8b95
|
|
| BLAKE2b-256 |
9e8218ae33a3b27c446641d630ddef46076892cb98d10200373a2479ea671752
|