This question is mostly about "socat", but here's some background to go with it:
I am trying -- for reasons having mostly to do with nostalgia -- to write a virtual modem driver for use with VirtualBox. It should listen to the socket that VirtualBox connects to the virtual guest, and emulate (a) a standard Hayes command set and (b) let one connect to remote systems using "atd some.host.name". Mostly it works, but I've run into problems with data transfers. I assume the problem is mine, because I seldom have the chance to muck about with mult-channel communication, select loops, and the like...
...so I though I would prototype my solution using the "socat" command, like this:
socat UNIX-CONNECT:/tmp/vbox.port EXEC:"telnet -E8 some.remote.host"
This works, sort of, just like my solution -- basic interactive typing seems fine, but try a file transfer and it just falls over. I've also tried this, just in case there was some sort of tty line discipline in the way:
socat UNIX-CONNECT:/tmp/vbox.port EXEC:"telnet -E8 some.remote.host",pty,raw,cs8
That didn't work any better.
I'm wondering if anyone here has thoughts on solving this. The problem is not with telnet; using -E8 provides an 8-bit clean path that works fine by itself (e.g., when not involved in this sort of pty-proxying).
This is obviously not a critical problem, but I'm hoping that someone else out there finds it at least mildly interesting.

socathas any problem with arbitrary byte streams, so I suspect the fault is elsewhere. Can you post a small reproducible example? – Gilles Mar 11 '11 at 20:59socat. (4) Try to transfer a file with zmodem (e.g., usingszfrom the lrzsz package). – larsks Mar 17 '11 at 1:03