Skip to main content

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)

Uploaded Source

Built Distribution

caduceussocket-0.1.5-py3-none-any.whl (7.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page