79441556

Date: 2025-02-15 13:08:46
Score: 0.5
Natty:
Report link

Yes, but not without additional work.

A raw TCP socket (or an asyncio stream) is designed to carry one continuous stream of data—not several independent connections at once. When your software uses multiple TCP ports, it expects separate channels for each connection. To forward all that traffic through a single socket, you must build a multiplexing protocol on top of your existing channel.

Consider using or adapting existing multiplexing libraries or protocols (for example, SSH uses a similar concept with channels over a single connection). This can save you from reinventing the wheel and reduce potential bugs in your custom implementation.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: A.Mohammed Eshaan