These are Python bindings for SSockets.
There is a Docker image that bundles Alpine Linux with Python, pip, and pyssockets.
Hope you're familiar with SSockets already. If not, go have a look.
Coding in C is cool and all, but we all want to mess around and hack things together sometimes. Python is great for that. This is for keeping the scalability of SSockets, I/O multiplexing and all, even if degrading throughput due to the language of choice.
This module is exclusively distributed as sources, so SSockets is expected to be there when doing:
pip install pyssockets
For this very reason, pyssockets versions are not correlated to SSockets versions. You should consider the Docker image for ease of deployment.
You might want to see an example.
The following functions are available:
pyssockets.addState, which receives a function.pyssockets.setHangupCallback,pyssockets.setTimeoutCallback, andpyssockets.setDestroyCallbackreceive a function too.pyssockets.run(ip : str, port : int, nthreads : int)
These constants are defined too:
pyssockets.RET_OKpyssockets.RET_READpyssockets.RET_WRITEpyssockets.RET_ERRORpyssockets.RET_FINISHED