Skip to main content

"socketsc"

License Version Python Documentation Status Downloads Issues

Installation

pip install socketsc

Usage

Simple client and server implementation.

Server

import socketsc

server = socketsc.SocketServer(("localhost", 8080), address_family=socketsc.AF_INET, sock_type=socketsc.SOCK_TCP)

print("Server listening on port 8080")

def on_question(socket: socketsc.ServerSocketWrapper, data):
    print(f"Received {data} from {socket.client_address}")
    socket.emit("answer", "1")

server.on("question", on_question)
server.serve()

Client

import socketsc

server_address = ("localhost", 8080)
sock = socketsc.SocketClient(server_address, address_family=socketsc.AF_INET, sock_type=socketsc.SOCK_TCP)


def on_answer(conn: socketsc.SocketClient, data):
    print(f"Server responded with {data}")


sock.emit("question", "0")
sock.on("answer", on_answer)

Metadata

Release files for socketsc 1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for socketsc 1.9
File Size Uploaded Provenance
socketsc-1.9.tar.gz 7.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for socketsc 1.9
File Interpreter ABI Platform
socketsc-1.9-py3-none-any.whl Python 3 none any Details

Total release size: 16.8 kB

Release files / socketsc-1.9.tar.gz

Download URL socketsc-1.9.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
97378f29f75e8651a57aa6031a9dde04a6cd6d70a9fbef16d88e93749c7283ac
BLAKE2b-256 checksum
How to use checksums
3b00bb4ad4ab5062f0acf7edabaa08542d4ed2e151502375da67d02e20ecaf1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Release files / socketsc-1.9-py3-none-any.whl

Download URL socketsc-1.9-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
02029adcfd50e6af76b688e1d3eb08e7a98947bf47790f07050f47f937e1064b
BLAKE2b-256 checksum
How to use checksums
9d4ed585f8f7c5076765cde5b8d8ac374a6b4cf4335c697ae427628497ada551
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Security for socketsc 1.9

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.

Release history Release notifications | RSS feed

This release

1.9 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page