I'd like to take a program P that reads from stdin & writes to stdout, but connect it to nc or whatever such that it reads from a certain port and outputs to another port.
# The reading is easy, here P reads from port 50505
nc -l 50505 | P
How do I get it to write back to say port 60606?
Pand expect to read the output ofPfrom the second TCP connection? Why the UDP tag?UDP, I think I wantedports, but that wasn't an existing keyword, so I thoughtTCP, and I think I addedUDPout of reflex.