progrium / qmux

wire protocol for multiplexing connections or streams into a single connection, based on a subset of the SSH Connection Protocol
MIT License
230 stars 48 forks source link

example with two sessions #26

Open matti opened 2 years ago

matti commented 2 years ago

the provided example uses just single session - wouldn't it make more sense to tunnel two ports, eg run two sessions in a multiplexer demo

progrium commented 2 years ago

I don't quite understand. It's multiplexing all concurrent requests to that port. You could run another instance of the client for another port. They wouldn't share a tunnel, but there isn't much reason to.

matti commented 2 years ago

I'll try to make a PR at some point: so that client would open two ports instead of just one

progrium commented 2 years ago

What would this demonstrate? You know each connection is a TCP session, so just having multiple connections to a port is multiplexing. I didn't add multiple ports in the example because from a practical standpoint it doesn't make sense and would just make it confusing.