Class Reference
IRIS for UNIX 2024.1.2
InterSystems: The power behind what matters   
Documentation  Search
  [USER] >  [%Net] >  [TelnetStream]
Private  Storage   

class %Net.TelnetStream extends %IO.MetaCharacterStream, %IO.IParts.SocketIO

This class emulates the handshaking behavior of Windows NT Telnet.exe

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
27 16 20


Summary

Properties
AWSHeight AWSWidth AtEnd CharEncoding
Curr3270Header DefaultFlushOnWrite ExternalBytePosition ExternalByteSize
IsCharacter IsOpen LineTerminator Name
NoReacknowledgements Position ResponseID Size
StreamIn StreamsCopyInput StreamsOutput TermTypes
TranslationTable WriteToStreamIn

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OnNew %OriginalNamespace
%PackageName %RemoveFromSaveSet %SerializeObject %SetModified
%ValidateObject AtEndGet BindCopyInput BindCopyInputArray
BindInput BindOutput BindOutputArray CP037ToLatin1
CharEncodingSet CharExport CharImport Clear
Close CopyFrom CopyReplace CopyReplaceArray
DefaultFlushOnWriteGet ExternalByteSeek ExternalByteSizeGet ExternalByteTruncateAt
Find Flush FlushCopyInput GetOption
InputFromDevice IsCharacterGet IsOpenGet Latin1ToCP037
LineTerminatorSet Open OutputToDevice PositionGet
Read ReadLine ReadRaw ReadUntil
ReadUntilArray Reset Rewind Seek
SetOption SizeGet TruncateAt Write
WriteLine WriteRaw escape processIACs
toAscii


Parameters

• parameter DEFAULTPORT = 23;
• parameter DEFAWSHEIGHT = 45;
• parameter DEFAWSWIDTH = 105;
• parameter DEFTERMTYPES = "ANSI; VT-100; IBM-3278-2";
• parameter OpDo = 253;
• parameter OpDont = 254;
• parameter OpENDSCR = 239;
• parameter OpIAC = 255;
• parameter OpNOP = 241;
• parameter OpSB = 250;
• parameter OpSE = 240;
• parameter OpWill = 251;
• parameter OpWont = 252;
• parameter OptBINX = 0;
• parameter OptECHO = 1;
• parameter OptENDREC = 25;
• parameter OptENV = 39;
• parameter OptENVVAR = 36;
• parameter OptLINEMODE = 34;
• parameter OptNAWS = 31;
• parameter OptSGA = 3;
• parameter OptSTATUS = 5;
• parameter OptTERMSPEED = 32;
• parameter OptTERMTYPE = 24;
• parameter OptTIMING = 6;
• parameter OptTOGGLEFLOW = 33;
• parameter OptXDISPLAY = 35;

Properties

• property AWSHeight as %Integer [ InitialExpression = ..#DEFAWSHEIGHT ];
• property AWSWidth as %Integer [ InitialExpression = ..#DEFAWSWIDTH ];
• property Curr3270Header as %String(TRUNCATE=1) [ InitialExpression = "xxxxx" ];
Current Header block for 3270E data
• property NoReacknowledgements as %Boolean [ InitialExpression = 0 ];
If this is set, don't re-acknowledge options we have already acknowledged once
• property ResponseID as %Integer;
integer for response count in 3270E header response mode
• property TermTypes as %String(TRUNCATE=1) [ InitialExpression = ..#DEFTERMTYPES ];
List of terminal types to claim to support, semicolon separated
• property TranslationTable as %String(TRUNCATE=1);
Name of the translation table to use for importing and exporting character text. See Translation Tables.

Methods

• method %OnNew(pBaseStream As %IO.I.Stream = "%IO.Socket") as %Status
This callback method is invoked by the %New method to provide notification that a new instance of an object is being created.

If this method returns an error then the object will not be created.

It is passed the arguments provided in the %New call. When customizing this method, override the arguments with whatever variables and types you expect to receive from %New(). For example, if you're going to call %New, passing 2 arguments, %OnNew's signature could be:

Method %OnNew(dob as %Date = "", name as %Name = "") as %Status If instead of returning a %Status code this returns an oref and this oref is a subclass of the current class then this oref will be the one returned to the caller of %New method.

• classmethod CP037ToLatin1(pData As %String)
• method CharExport(pData As %String) as %String
• method CharImport(pData As %String) as %String
• method Close(Output pSC As %Status) as %Boolean
Close the current stream
• method GetOption(pName As %String, Output pSC As %Status) as %String
• classmethod Latin1ToCP037(pData As %String)
• method Open(pHost As %String = "", pPort As %String = "", ByRef pTimeout As %Numeric = -1, Output pSC As %Status) as %Boolean
• method Read(pMaxReadLen As %Integer, ByRef pTimeout As %Numeric = -1, Output pSC As %Status) as %String
Read until pMaxReadLen chars are gotten or pTimeout expires On return, if pTimeout is unchanged it means the full timeout period expired. If the timeout period expired and the returned string is shorter than pMaxReadLen, then AtEnd will be 1.
• method ReadLine(pMaxReadLen As %Integer, ByRef pTimeout As %Numeric = -1, Output pSC As %Status, pLineTerminator As %String = ..LineTerminator) as %String
Read until pMaxReadLen chars are gotten, pTimeout expires, or a LineTerminator character is found. On return, if pTimeout=0 it means no timeout occurred. If pTimeout=0 and the returned string contains the full pMaxReadLen characters, it means no LineTerminator was encountered yet, even if the following character would be a LineTerminator. If pTimeout=0 and the returned string is shorter than pMaxReadLen, then either a LineTerminator or the End Of Stream (AtEnd = 1) was encountered. If pLineTerminator is defined, then the line is read until one of the given characters is encountered. On return, pLineTerminator contains the encountered character(s) if any.
• method ReadRaw(pMaxReadLen As %Integer, ByRef pTimeout As %Numeric, Output pSC As %Status) as %String
• method Reset(pStream As %IO.I.Stream, pTimeout As %Numeric = 10, Output pSC As %Status)
• method SetOption(pName As %String, pVal As %String, Output pSC As %Status)
• method Write(pData As %String = "", pFlush As %Boolean, Output pSC As %Status)
Write pData to the stream buffer. If pFlush is True, ensure that the data are actually sent to the stream.
• method WriteLine(pLine As %String = "", pFlush As %Boolean, Output pSC As %Status)
In in 3270(e) mode, writes out a record with header and terminator (IAC-EOR) Otherwise, writes out the line followed by the standard ..LineTerminator character(s)
• method WriteRaw(pData As %String = "", pFlush As %Boolean, Output pSC As %Status)
• classmethod escape(str As %String) as %String
• method processIACs(pData As %String, Output pReplied As %Boolean, Output pSC As %Status) as %String
• classmethod toAscii(pStr) as %String


Copyright (c) 2025 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.