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.1a4.tar.gz
(17.3 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.1a4-py3-none-any.whl
(20.2 kB
view details)
File details
Details for the file nioflux-0.0.1a4.tar.gz.
File metadata
- Download URL: nioflux-0.0.1a4.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4ebaf457a86c61ddbf6080d732476ac28a0a1a73d17cc0bcd078e109f2c5d52
|
|
| MD5 |
2675b1da8950f829ab12784f7ca50fb4
|
|
| BLAKE2b-256 |
b020b91000cd76f73d7365cd2f6f4345dd49572db577a6c2d6f52ad332cfeab5
|
File details
Details for the file nioflux-0.0.1a4-py3-none-any.whl.
File metadata
- Download URL: nioflux-0.0.1a4-py3-none-any.whl
- Upload date:
- Size: 20.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de70574705223597305449284e82b353c51dde4237e019f893efb9ad3dc42568
|
|
| MD5 |
0a722376e8cbafe4e3378cf4b6d432ef
|
|
| BLAKE2b-256 |
03fd37f2c771344f5f6ad2cf1dba3d24ce169a777ed201717002b1b46fe838ce
|