Skip to main content

EnsLib.TCP.CountedCommon

abstract class EnsLib.TCP.CountedCommon

TCP read & write helper classmethods

Property Inventory

Method Inventory

Parameters

parameter Mode = SW;
Override the Device Mode that will be used to open the TCP socket
parameter SETTINGS = Charset:Connection:selector?context={Ens.ContextSearch/CharacterSets},Endian:Connection;

Properties

property Charset as %String [ InitialExpression = "UTF-8" ];
Character encoding scheme used for decoding incoming data and encoding outgoing data. For no encoding, use 'Binary'. Other choices include:
Native - the default character encoding of the installed locale of the InterSystems IRIS server
latin1 - the ISO Latin1 8-bit encoding
ISO-8859-1 - the ISO Latin1 8-bit encoding
UTF-8 - the Unicode 8-bit encoding
Unicode - the Unicode 16-bit encoding (Little-Endian)
UnicodeBig - the Unicode 16-bit encoding (Big-Endian)
@<ttable> - <ttable> means a raw InterSystems character translation table name. A prefix of '@' means to use the named table.
Property methods: CharsetDisplayToLogical(), CharsetGet(), CharsetIsValid(), CharsetLogicalToDisplay(), CharsetLogicalToOdbc(), CharsetNormalize(), CharsetSet()
property Endian as %String (VALUELIST = ",Big,Little,JavaUTF") [ InitialExpression = "Big" ];
Byte order of the block count prefix. Big endian means 4-byte MSB goes over the wire first; Little Endian means 4-byte LSB goes over the wire first. JavaUTF means 2-byte MSB goes over the wire first.
Property methods: EndianDisplayToLogical(), EndianGet(), EndianIsValid(), EndianLogicalToDisplay(), EndianLogicalToOdbc(), EndianNormalize(), EndianSet()
property UseFileStream as %Boolean;
Should the adapter construct a FileStream or a GlobalStream for data received?
Property methods: UseFileStreamDisplayToLogical(), UseFileStreamGet(), UseFileStreamIsValid(), UseFileStreamLogicalToDisplay(), UseFileStreamNormalize(), UseFileStreamSet()

Methods

method ReadCountedStream(ByRef pStream As %CharacterStream = "", pCharset As %String = "", pStartTimeout As %Numeric = -1, pChunkTimeout As %Numeric = 60, pInbound As %Boolean = 0) as %Status
Read a counted block from the TCP socket into the Stream using a Charset for translation. (logs errors except for errors after the initial blocksize read.)
method ReadCountedString(ByRef pString As %String, pCharset As %String = "", pStartTimeout As %Numeric = -1, pChunkTimeout As %Numeric = 60, pInbound As %Boolean = 0) as %Status
Read a counted block from the TCP socket into the Stream using a Charset for translation. (logs errors except for errors after the initial blocksize read.)
method WriteCountedStream(pStream As %Stream.Object, pCharset As %String = "", pInbound As %Boolean = 0) as %Status
Write the stream contents as a counted block on the TCP socket (logs errors except for error.)
method WriteCountedString(pString As %String, pCharset As %String = "", pInbound As %Boolean = 0) as %Status
Write the stream contents as a counted block on the TCP socket (logs errors except for error.)

Subclasses

FeedbackOpens in a new tab