How can one read packets from a specific port [i.e. 3270] and then write packets directly to the port?
Is this possible?

The scenario is I currently have a old, old, old 3270 emulator that runs in Internet Explorer as a java app. However there is no scripting options. I want to develop some simple log on and screen scrapping scripts.

TIA