Communicate Client-Server via Windows NamedPipe.
Project description
winConnect (Windows Only)
Communication Client->Daemon via NamedPipe
ToDo:
- Add support for sending and receiving data
- Add support for other header settings
- Add support for safe closing
- Add logging
- Particular client to client communication (via chunks(?))
- Add support for encryption
- 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.
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.1.tar.gz.
File metadata
- Download URL: winconnect-0.9.1.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a01d1f6cde512a7cadc7a76778bf9bae4bd74fb6503f9a92c74bcb620ab7020
|
|
| MD5 |
21bb0026aaf8b7eb405458b8b540dda4
|
|
| BLAKE2b-256 |
4559d97dbda805da38d2332a2a3dd6ea058202dd66a9eecda8e07c17a6687d17
|
File details
Details for the file winconnect-0.9.1-py3-none-any.whl.
File metadata
- Download URL: winconnect-0.9.1-py3-none-any.whl
- Upload date:
- Size: 9.5 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 |
e56f1e204568e3e770bade3636b5e8fee92b3cc42ab498824d1e3253ee6045ef
|
|
| MD5 |
ed7bf3f50d7796466bf1f362b0b863f5
|
|
| BLAKE2b-256 |
bf35bff6e38f9cad2a70d0753b85a091172e3fe2611ea5d8b3d240c7c90223ef
|