A python socket manager.
Project description
A python socket manager.
Extend Session for server classes. Extend Connection for client clasess. To expose functions to RPC calling, add their name to the white_list_functions list. To call a function, you can send JSON with the function name and arguments contained:
{
"type": "function_name",
"args": [
"argument 1",
"argument 2"
]
}
You can register a new connection by sending the clients name and the name of the session they should be moved to:
{
"type": "register",
"args": [
"client_name",
"session_name"
]
}
To send a message to other clients, you can call the broadcast message using the message and client name:
{
"type": "broadcast",
"args": [
"message",
"client_name"
]
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
caduceussocket-0.1.5.tar.gz
(5.5 kB
view hashes)
Built Distribution
Close
Hashes for caduceussocket-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5cdad1ee8e36515727df0d20ecd1925533ba2e7296d9ad5474730cf2fb5259e |
|
MD5 | 359a70c6f5b8eac8a79cb8304038154e |
|
BLAKE2b-256 | 60103535685c6df0566de1f1242520e96caee68d6336c160e6ce5b4fe17e4eb5 |