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.4.tar.gz (1.8 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: networkinglib-0.2.4.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.4.tar.gz
Algorithm Hash digest
SHA256 803a21374688eef103f8c5187ecf4f96808e9f23aaa8fadc78db43098e35f8fa
MD5 644af3107338eff475346db7e573a20e
BLAKE2b-256 0af59493ffff2e69047ae39892df2da35ad1baa33bc2713bdce5aecf068a365c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for networkinglib-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 69262a4c00db7492e0ba710c9c87fb286bb463196f12d6ea46ac3e8b17ade72e
MD5 7d8406d5eb7e24114d31ccebd69a0f9f
BLAKE2b-256 4c3fbd2b38912e677eac7b2ff67dfb8c8271961f96184d78f77eb66a4ad35b85

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