Callback resource

Description
Replaces stdin/stdout scripting with a socket.

The format of this resource uses listener syntax.

In s3270, this resource is similar to the scriptPort resource, except that the direction of the TCP connection is reversed. That is, instead of listening for connections on the specified port, s3270 makes a connection to that port. As with scriptPort, s3270 no longer accepts s3270 protocol commands from its standard input.

In b3270, this resource has the same effect, but the TCP connection uses the b3270 protocol instead.

The purpose of this option is to simplify port selection in peer scripts that start a copy of s3270 or b3270. The script listens on a socket, letting the system pick an unused port number. Then it starts the emulator, passing that port number with the -callback command-line option. Finally, it accepts the connection from the emulator and closes its listening socket.