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.2.tar.gz
(1.7 kB
view details)
Built Distribution
File details
Details for the file networkinglib-0.2.2.tar.gz
.
File metadata
- Download URL: networkinglib-0.2.2.tar.gz
- Upload date:
- Size: 1.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab20f942792be6d3ec44e44026f84ed578e91e95a59f2646c722f3a3659466e2 |
|
MD5 | 51f7b922e9b469ff488ae050ffe1f8b2 |
|
BLAKE2b-256 | 3344c552badf22058c670ff50b214c4d0f43f3801c4b1a2ba805400a6e732b11 |
File details
Details for the file networkinglib-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: networkinglib-0.2.2-py3-none-any.whl
- Upload date:
- Size: 2.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 560ef60503f5b4c1d92c830ecf48ed95a5aaeaaba2c1d08cde4da324db0b1be8 |
|
MD5 | 5b81dbfe57081a0074a95d94b5ccf8e0 |
|
BLAKE2b-256 | 49bf50605ecf52070aaccdd39769b050825d0d21d40fddba7e7744fdb1bd3053 |