A lightweight asynchronous scalable TCP frame protocol server.
Project description
NioFlux
A lightweight asynchronous scalable TCP frame protocol server.
Installation
pip install -U nioflux
or
uv add -U nioflux
Develop you tcp frame protocol server
import asyncio
from nioflux import Server, StrDecode, StrEncode, PipelineStage
class MyProtocolHandler(PipelineStage):
def __init__(self):
super().__init__()
async def __call__(self, data, extra, err, fire, io_ctx):
print('Recv:', data)
return data, extra, err, fire
async def main():
server = Server([StrDecode(), MyProtocolHandler(), StrEncode()])
print('Server: ', server)
await server.run()
if __name__ == '__main__':
asyncio.run(main())
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
nioflux-0.0.2.tar.gz
(17.5 kB
view details)
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
nioflux-0.0.2-py3-none-any.whl
(20.3 kB
view details)
File details
Details for the file nioflux-0.0.2.tar.gz.
File metadata
- Download URL: nioflux-0.0.2.tar.gz
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9523297be5d13aeb13ed3c223233e11e7ecf4cd07f9c40d530a0c654ceabab4
|
|
| MD5 |
2c0fdd0a0b4c30f30a784ed13c074db5
|
|
| BLAKE2b-256 |
2f08777cb5c97203c39783dea661fe11f5f608e53e121c3506d18f8d4789c179
|
File details
Details for the file nioflux-0.0.2-py3-none-any.whl.
File metadata
- Download URL: nioflux-0.0.2-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d24df0149b4310d630d9b5f7cf675a66ac59ef7668244c363a62418ac8453eaa
|
|
| MD5 |
35580bd5dc2cb0580e1b776dbccf2a37
|
|
| BLAKE2b-256 |
6a09411d2b9357b8fde99d8a9ca91431193ce56acde8941c0c32a15676699d6e
|