connect two serial port instances from a (ruby) program to a physical serial port (usb0)

view story

http://stackoverflow.com – I have a program (jruby with rxtx on ubuntu-machine) which opens 2 seperate serial ports. Is it possible to connect both of them to one hardware port i.e. ttyUSB0, or alternatively to a virtual serial port (I have a program to simulate the hardware)? Is there something like a software repeater/hub to connect 2 serial ports? I checked socat but this one only connects 2 ends with one another. I have read hint for vde2 and hint for slip/slattach but could not find a solution. (HowTos)