Alternate screen size support.
This is a relatively big new feature, which introduces small breaking changes to the API: * NegotiateTelnet() now returns (DevInfo, error) instead of just error. The function signature for the Tx type now has one additional DevInfo parameter. * RunTransactions() requires one additional parameter, the DevInfo (which is allowed to be nil). Otherwise, existing behavior continues to work as-is and everything still defaults to operating on the default 24x80 terminal size. See example5 for a larger-terminal-aware application. Pending some time to make sure no new bugs cropped up in this release and that the alternate screen size support works in the wild, I anticipate this will become the v1.0.0 release of go3270.
This commit is contained in:
1 parent
3a38ce6e4a
commit
b6fa48f37f
19 files changed
+820
-126
No files matched your search
@@ -10,7 +10,13 @@ This library allows you to write Go servers for tn3270 clients by building 3270
|
||||
Usage
|
||||
-----
|
||||
|
||||
See the example folders for quick demonstrations of using the library. example1 uses the lower-level function ShowScreenOpts(), and example2 uses a higher-level function HandleScreen(). example3 demonstrates updating the client's 3270 display while waiting for a response by using an update thread and a waiting response thread.
|
||||
See the example folders for quick demonstrations of using the library:
|
||||
|
||||
* example1 uses the lower-level function ShowScreenOpts().
|
||||
* example2 uses a higher-level convenience function HandleScreen().
|
||||
* example3 demonstrates updating the client's 3270 display while waiting for a response by using an update thread and a waiting response thread.
|
||||
* example4 demonstrates the RunTransactions() approach to handing control from one screen to the next. This is the recommended way to build applications using go3270.
|
||||
* example5 demonstrates support for larger-than-default (24x80) terminal sizes.
|
||||
|
||||
**NEW**: For larger applications, I recommend using the `RunTransactions()` function to serve as the driver for your application. You can implement transaction functions which pass control from one transaction to another. example4 demonstrates a "larger" application that uses this approach.
|
||||
|
||||
@@ -18,22 +24,17 @@ Here's [a video introducing the library][introVideo] as well.
|
||||
|
||||
[introVideo]: https://www.youtube.com/watch?v=h9XTjup5W5U
|
||||
|
||||
Known Problems
|
||||
--------------
|
||||
|
||||
- The telnet negotiation does not check for any errors or for any responses from the client. We just assume it goes well and we're actually talking to a tn3270 client.
|
||||
- Screen size is limited to exactly 24x80. In the future, the terminal type could be interrogated and the library could support the screen sizes of other 3270 models.
|
||||
|
||||
3270 information
|
||||
----------------
|
||||
|
||||
Everything I know about 3270 data streams I learned from [Tommy Sprinkle's tutorial][sprinkle]. The tn3270 telnet negotiation is gleaned from [RFC 1576: TN3270 Current Practices][rfc1576], [RFC 1041: Telnet 3270 Regime Option][rfc1041], and [RFC 854: Telnet Protocol Specification][rfc854]. The IANA maintains a [useful reference of telnet option numbers][telnetOptions].
|
||||
I started learning about 3270 data streams from [Tommy Sprinkle's tutorial][sprinkle]. The tn3270 telnet negotiation is gleaned from [RFC 1576: TN3270 Current Practices][rfc1576], [RFC 1041: Telnet 3270 Regime Option][rfc1041], and [RFC 854: Telnet Protocol Specification][rfc854]. The IANA maintains a [useful reference of telnet option numbers][telnetOptions]. The reference I use for 3270 data streams is [the 1981 version from IBM][ibmref].
|
||||
|
||||
[sprinkle]: http://www.tommysprinkle.com/mvs/P3270/
|
||||
[rfc1576]: https://tools.ietf.org/html/rfc1576
|
||||
[rfc1041]: https://tools.ietf.org/html/rfc1041
|
||||
[rfc854]: https://tools.ietf.org/html/rfc854
|
||||
[telnetOptions]: https://www.iana.org/assignments/telnet-options/telnet-options.xhtml
|
||||
[ibmref]: https://bitsavers.org/pdf/ibm/3270/GA23-0059-0_3270_Data_Stream_Programmers_Reference_Jan1981.pdf
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Reference in new issue
Block a user