On windows I've done bidirectional communication though a pipe. I haven't tried though a pty or socket though. Do either of them work?