examples.tcp package

Submodules

examples.tcp.test_tcp_data_transfer module

TCP P2P Data Transfer Test

This test proves that TCP peer-to-peer data transfer works correctly in libp2p. This serves as a baseline to compare with WebSocket tests.

Usage:

python examples/tcp/test_tcp_data_transfer.py pytest examples/tcp/test_tcp_data_transfer.py -v

async examples.tcp.test_tcp_data_transfer.create_tcp_host_pair()

Create a pair of hosts configured for TCP communication.

async examples.tcp.test_tcp_data_transfer.test_tcp_basic_connection()

Test basic TCP connection establishment.

async examples.tcp.test_tcp_data_transfer.test_tcp_bidirectional_transfer()

Test bidirectional data transfer over TCP.

async examples.tcp.test_tcp_data_transfer.test_tcp_data_transfer()

Test TCP peer-to-peer data transfer.

async examples.tcp.test_tcp_data_transfer.test_tcp_large_data_transfer()

Test TCP with larger data payloads.

Module contents