Skip to main content
https://semaphoreci.com/api/v1/projects/be1ed091-9d94-49d5-8391-781d1f1d76b8/1282662/shields_badge.svg https://img.shields.io/pypi/pyversions/tcpbridge.svg https://img.shields.io/pypi/v/tcpbridge.svg

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()

Metadata

Release files for tcpbridge 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tcpbridge 1.1.1
File Size Uploaded
tcpbridge-1.1.1.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tcpbridge 1.1.1
File Interpreter ABI Platform
tcpbridge-1.1.1-py2-none-any.whl Python 2 none any Details

Total release size: 8.8 kB

Release files / tcpbridge-1.1.1.tar.gz

Download URL tcpbridge-1.1.1.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d970c3635a2f0115cccbc0b7c0f27f8b8cd6981ef8cbd5b95fc7b224a6313133
BLAKE2b-256 checksum
How to use checksums
2191758ec610a2fc726f0d539e0171b1bda3a99c59534a0997e6bae8bdb34422
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / tcpbridge-1.1.1-py2-none-any.whl

Download URL tcpbridge-1.1.1-py2-none-any.whl
Size 5.4 kB
Tags Python 2
SHA-256 checksum
How to use checksums
397a8f0be256600c4b658dcd3cfb9f00a1c4981aeeec56beeec6653d9a5c740b
BLAKE2b-256 checksum
How to use checksums
9338f161db29195a295ba0f39c2d3972373ffadc91ae9f6f934e836bfb725f09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page