Skip to main content

Extension providing a basic networking protcol implementations as a Python module using mainly C-Extenstions.

Project description

networkinglib

Python Networking Module

How to use

TCP Client

Opening socket and connecting to server

from networkinglib import tcp
socket = tcp.connect('127.0.0.1', 7777)
if not socket: print("Could not connect!")

Sending packet

socket.send("Hello Server!")

Receiving Packets

print(socket.receive())

Closing connection

socket.close()

UDP Client

Opening socket

from networkinglib import udp
socket = udp.open()
if not socket: print("An unexpected error occured!")

Sending packet

socket.send("Hello Server!", "127.0.0.1", 7777)
# or
socket.send("Hello Server!", "127.0.0.1:7777")

Receiving Packets

print(socket.receive())

Closing connection

socket.close()

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

networkinglib-0.2.3.tar.gz (1.8 kB view details)

Uploaded Source

Built Distribution

networkinglib-0.2.3-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file networkinglib-0.2.3.tar.gz.

File metadata

  • Download URL: networkinglib-0.2.3.tar.gz
  • Upload date:
  • Size: 1.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for networkinglib-0.2.3.tar.gz
Algorithm Hash digest
SHA256 15c9c9dba8e9eaec756925f30000e0eb241d1d43f0d311b034cfa9be61c13cde
MD5 b67d4d28e10926822ca9ab2ea025a0bc
BLAKE2b-256 d3505a06b6ba29602a13f93e8bf14119ed6b42e2ebaed0f113b10a4cb4509196

See more details on using hashes here.

File details

Details for the file networkinglib-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for networkinglib-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c3adcc8e3c999ae654508252c5567139778745cd61c55500e3bc001acebd93fb
MD5 1337df9776c7344d65e4b0ebf1dbc7d0
BLAKE2b-256 455a6464c7ee2d04266a4a94fbe5d35b241634b85c1755f2554f889abbbaabe8

See more details on using hashes here.

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