Simple TCP socket client
Project description
Simple TCP socket client
Installation
Install it with pip:
$ pip install simple-socket-client
Or you can add it as dependency in requirements.txt file of your python application:
simple-socket-client~=1.0
Usage
from simple_socket_client import SimpleSocketClient
client = SimpleSocketClient('192.168.0.2', 6666)
client.connect()
client.send('Test'.encode()) # if you don't need an answer
answer = client.ask('Hi!'.encode())
print(answer.decode())
client.disconnect()
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
File details
Details for the file simple-socket-client-1.0.tar.gz
.
File metadata
- Download URL: simple-socket-client-1.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc3133261461a11440c4c3775d0c40b5b3afcf7c160be3baae3cf9b4005fc96c |
|
MD5 | 1023e1890095af5da62356d81ff8d64e |
|
BLAKE2b-256 | f4267303132a942b0d4d43afac42409b218195097c01ddaef89ac6bce390766d |