I have two TCP servers and each expects a client connection, but I need to have them talk to each other. This is how the connection looks like:


Ser2net listens on a port and ofono-phonesim listens on a port, but ultimately I want the device to speak to the modem simulator.

It would not be hard to implement the XXX, but perhaps there is something ready available? A suggestion of a simple suitable scripting language library would be appreciated as well.



If I understood your problem correctly, then I can simulate your environment with three terminals.

In the first, I run nc -l -p 1337. In the second, I run nc -l -p 1338.

Now, in the third, I run


and I am able to enter text in terminal 1 and it arrives in terminal 2. And vice versa.

| improve this answer | |
  • You have got a spot on! I am accepting this answer. Thanks! – Roman Saveljev Oct 30 '15 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.