abstract class EnsLib.TCP.FramedCommon
extends %RegisteredObject
Helper class for Framed TCP inbound/outbound
property DiscardDataNotwithinFraming
as %Boolean [ InitialExpression = 1 ];
Discard any data not within expected frame
property MessageFrameEnd
as %String [ InitialExpression = "28,13" ];
Comma separated list of control characters that indicate terminators to a message.
Can be Decimal or Hex if have preceding 'x'
For example 28,13 or x1C,x0D
property MessageFrameEndAsChars
as %String [ Transient ];
Used to store actual Frame end characters
property MessageFrameStart
as %String [ InitialExpression = "11" ];
Comma separated list of control characters that indicate start of a message.
Can be Decimal or Hex if have preceding 'x'
For example 11 or x0B
property MessageFrameStartAsChars
as %String [ Transient ];
Used to store actual Frame start characters
property RemoveFraming
as %Boolean [ InitialExpression = 1 ];
Remove Framing characters from data received
property UseFileStream
as %Boolean;
Should the adapter construct a FileStream or a GlobalStream for data received?
method AsciiOrHexAsChars(pAsciiOrHex As %String = "")
as %String
Method to convert comma delimited numbers to characters
method ReadFixedLengthStream(ByRef pStream As %CharacterStream = "", pCharset As %String = "", pStartTimeout As %Numeric = -1, pChunkTimeout As %Numeric = 60, pInbound As %Boolean = 0, pLen As %Integer = 0)
as %Status
Read a fixed length block from the TCP socket into the Stream using a Charset for translation.
(logs errors except for errors after the initial blocksize read.)
method ReadFramedStream(ByRef pStream As %Stream.Object = "", pCharset As %String = "", pStartTimeout As %Numeric = -1, pChunkTimeout As %Numeric = 60, pInbound As %Boolean = 0, Output pProcessMessage As %Integer = 0, Output pDiscardedMessage As %Integer = 0)
as %Status
Read a framed block from the TCP socket into the Stream using a Charset for translation.
(logs errors except for errors after the initial blocksize read.)
method ReadFramedString(ByRef pString As %String, pCharset As %String = "", pStartTimeout As %Numeric = -1, pChunkTimeout As %Numeric = 60, pInbound As %Boolean = 0, Output pProcessMessage As %Integer = 0, Output pDiscardedMessage As %Integer = 0)
as %Status
Read a framed block from the TCP socket into the String using a Charset for translation.
(logs errors except for errors after the initial blocksize read.)
method WriteFramedStream(pStream As %Stream.Object, pCharset As %String = "", pInbound As %Boolean = 0, pUseFrameProperties As %Boolean = 1)
as %Status
Write the stream contents as a framed block on the TCP socket
(logs errors except for error.)
method WriteFramedString(pString As %String, pCharset As %String = "", pInbound As %Boolean = 0)
as %Status
Write the stream contents as a framed block on the TCP socket
(logs errors except for error.)