2

When resuming a tmux workspace on my laptop, I regularly have to decide between the wired and WiFi connection. Ethernet has very low latency, but forces me to reconnect any time the laptop is moved. While the other exhibits occasional snags (slow moments) but allows me to move the laptop without losing the connection.

What technologies are there that could save the state of a network socket, suspend it, and then bring it back alive over a different network interface? This would be switching the IP address!

What is the most practical way to achieve something like this, or would it necessarily have to be built into the application itself? I am guessing the latter, because a single connection must have a 4-tuple of source and destination IP addresses and ports.

Even if this were the case, it stands to reason that a level of abstraction could be built to support connection-roaming. Conceptually, some "wrapper service" for the sshd on host computer that listens on the network. While the ssh client would also need to connect to a local outgoing connection-wrapper "service".

Upon interruption, the "service" will just start blocking the applications' attempts to communicate over the socket until such time that a connection between the computers could be re-established. Theoretically this middleman-service can use carrier pidgeons (ok, ok, say, a completely independent implementation of TCP written on top of UDP) as transport layer.

Does such software exist (to keep a connection alive even if you were to do something like switch network devices)?

2 Answers 2

2

I don't think anything like what you're looking for exists, but for your specific problem, Mosh might be a practical solution.

1
  • Wow, that's awesome. This definitely fits the bill. Thanks!
    – Steven Lu
    Commented Jul 23, 2013 at 5:33
-1

Your problem would be solved by using screen.

screen is a process that runs a virtual terminal. You can disconnect it, and then reconnect to it later. You can have any number of screens running. If you are physically disconnected, the "virtual" screen stays up and you can reconnect to it later.

1
  • yeah but it isn't transparent without scripting. Nor is it transport-level. I am already a serious Tmux user :)
    – Steven Lu
    Commented Jul 23, 2013 at 3:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .