Class Reference
EnsLib.TCP.CountedCommon
Server:appadmin-00044-deployment-6bf4cbc86d-9f4xc
Instance:IRIS
User:SuperUser
 
-
  [USER] >  [EnsLib] >  [TCP] >  [CountedCommon]
Private  Storage

abstract class EnsLib.TCP.CountedCommon

TCP read & write helper classmethods

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
2 3 4


Summary

Properties
Charset Endian UseFileStream

Methods
ReadCountedStream ReadCountedString WriteCountedStream WriteCountedString

Subclasses
Ens.Enterprise.MsgBank.BankTCPAdapter Ens.Enterprise.MsgBank.ClientTCPAdapter EnsLib.TCP.CountedInboundAdapter
EnsLib.TCP.CountedOutboundAdapter EnsLib.TCP.CountedXMLInboundAdapter

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 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 UseFileStream as %Boolean;
Should the adapter construct a FileStream or a GlobalStream for data received?

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.)


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