No project description provided
Project description
TCP bridge for data transfer
Requirements
Only for tests
pytest
pytest-cov
Install/Uninstall
make install
make uninstall
Example
import socket
from tcpbridge import SocketSink, TCPBridge
svr_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
svr_sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
svr_sock.bind(('localhost', 9002))
svr_sock.listen(1)
cli_sock, _ = svr_sock.accept()
socket_sink = SocketSink(sock=cli_sock)
Single endpoint TCP Bridge
In background
bridge = TCPBridge(sink=socket_sink, port_in=9000)
bridge.start()
...
bridge.stop()
Dual endpoint TCP Bridge
In foreground
bridge = TCPBridge(sink=socket_sink, port_in=9000, port_out=9001)
bridge.start(in_background=False)
...
bridge.stop()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tcpbridge-1.0.0.tar.gz
(3.3 kB
view details)
Built Distribution
File details
Details for the file tcpbridge-1.0.0.tar.gz
.
File metadata
- Download URL: tcpbridge-1.0.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
32a5619fab44894be8402b2d875d15f7bad96a7bf10e302868bf621afe9a1ec6
|
|
MD5 |
35cbed24dcfa5ba648ac6f7108e65849
|
|
BLAKE2b-256 |
6527604c3367e6116bbbe54b5109af3c606ec5974d17b6a29deff281ee84abee
|
File details
Details for the file tcpbridge-1.0.0-py2-none-any.whl
.
File metadata
- Download URL: tcpbridge-1.0.0-py2-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
3de601f83552cc1b96d0125dd4bf27d14f7ce5107bd15dde50c55a737f9df229
|
|
MD5 |
4cde32a3e4be4ddc652a966c57f954b2
|
|
BLAKE2b-256 |
02388dc8c87c4130feceef15d6765360c724750e3e616850ea65800966fa485f
|