asynmsg
A library based on asyncore, used to build tcp server/client application communicating each other with customized messages.
Examples
Server:
import asynmsg
@asynmsg.with_message_handler_config
class ServerSession(asynmsg.SessionS):
@asynmsg.message_handler_config('Login')
def on_Login(self, msg_id, msg_data):
self.send_message('LoginAck', 'login success')
class Server(asynmsg.Server):
session_class = ServerSession
Server(('127.0.0.1', 12345))
asynmsg.run_forever()
Client:
import asynmsg
@asynmsg.with_message_handler_config
class ClientSession(asynmsg.SessionC):
def on_opened(self):
asynmsg.SessionC.on_opened(self)
self.send_message('Login', 'test1')
@asynmsg.message_handler_config('LoginAck')
def on_LoginAck(self, msg_id, msg_data):
pass
class Client(asynmsg.ClientBlockConnect):
session_class = ClientSession
client = Client(('127.0.0.1', 12345))
if client.is_started():
asynmsg.run_forever()
Metadata
Release files for asynmsg 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| asynmsg-0.1.6.zip | 11.4 kB | Without provenance | Details for asynmsg-0.1.6.zip |
Release files / asynmsg-0.1.6.zip
| Download URL | asynmsg-0.1.6.zip |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13f8ed4ec5b653430e536b9c65045fff990ee5592d443ec043ce657fed253b64
|
|
BLAKE2b-256 checksum How to use checksums |
a92bd8b62609946f7c629285d3ed4185a05e1ef40afcf91aa0fba630bf2384c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for asynmsg 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.