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.0.tar.gz
(3.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tcpbridge-1.1.0.tar.gz.
File metadata
- Download URL: tcpbridge-1.1.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd67135ead09003efa4fe9218ea83d8eac1ac8f8fc4eabc871fb7cbd681a9d0d
|
|
| MD5 |
32b94b8acb773d07e038fb37ffcb0493
|
|
| BLAKE2b-256 |
7154903feb78e03af00c61b8c0efd2c0853b2f9704fd5067131314acc4d8044e
|
File details
Details for the file tcpbridge-1.1.0-py2-none-any.whl.
File metadata
- Download URL: tcpbridge-1.1.0-py2-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
001fd64a4ff068585c7084e79ae709274db99124638195b29de68303d158a54b
|
|
| MD5 |
2c5595e2a9fd7eadab1a17e3061d5538
|
|
| BLAKE2b-256 |
c5a03a579e3239eb592450d76507161ec3965919a5680cb6ef5275ae2a62dffe
|