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.1.1.tar.gz
(3.4 kB
view details)
Built Distribution
File details
Details for the file tcpbridge-1.1.1.tar.gz
.
File metadata
- Download URL: tcpbridge-1.1.1.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d970c3635a2f0115cccbc0b7c0f27f8b8cd6981ef8cbd5b95fc7b224a6313133 |
|
MD5 | c256820012bf85c2e8814462b32c4e84 |
|
BLAKE2b-256 | 2191758ec610a2fc726f0d539e0171b1bda3a99c59534a0997e6bae8bdb34422 |
File details
Details for the file tcpbridge-1.1.1-py2-none-any.whl
.
File metadata
- Download URL: tcpbridge-1.1.1-py2-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 397a8f0be256600c4b658dcd3cfb9f00a1c4981aeeec56beeec6653d9a5c740b |
|
MD5 | 50aa4a17df5d8131bb6dfc27a4e4f629 |
|
BLAKE2b-256 | 9338f161db29195a295ba0f39c2d3972373ffadc91ae9f6f934e836bfb725f09 |