Home > Class Reference > %SYS namespace > %Net.WebSocket.Frame

%Net.WebSocket.Frame

class %Net.WebSocket.Frame extends %Library.RegisteredObject

Represents a sent/received frame in a WebSocket connection. This class is internal to the module and should not be used directly.

Property Inventory (Including Private)

Method Inventory (Including Private)

Properties (Including Private)

property Device as %String [ Private ];
Device from which to read (for reads) or write (for writes)
Property methods: DeviceDisplayToLogical(), DeviceGet(), DeviceIsValid(), DeviceLogicalToDisplay(), DeviceLogicalToOdbc(), DeviceNormalize(), DeviceSet()
property Fin as %Boolean [ InitialExpression = 1 , Required ];
Property methods: FinDisplayToLogical(), FinGet(), FinIsValid(), FinLogicalToDisplay(), FinNormalize(), FinSet()
property HasMessage as %Boolean [ InitialExpression = 1 ];
Set to false if Read() times out rather than receiving a message
Property methods: HasMessageDisplayToLogical(), HasMessageGet(), HasMessageIsValid(), HasMessageLogicalToDisplay(), HasMessageNormalize(), HasMessageSet()
property Masked as %Boolean [ InitialExpression = 0 , Required ];
Set to 1 if the payload was received masked Always set to 1 in send
Property methods: MaskedDisplayToLogical(), MaskedGet(), MaskedIsValid(), MaskedLogicalToDisplay(), MaskedNormalize(), MaskedSet()
property MaskingKey as %Binary;
4-byte masking key (if Masked is true) If not provided prior to send, will be generated randomly
Property methods: MaskingKeyGet(), MaskingKeyIsValid(), MaskingKeySet()
property Opcode as %Integer (MAXVAL = 10, MINVAL = 0) [ Required ];
Valid values (macros in HSMOD.WebSocket.INC) are: $$$WebSocketOpContinuation 0 $$$WebSocketOpTextFrame 1 $$$WebSocketOpBinaryFrame 2 $$$WebSocketOpClose 8 $$$WebSocketOpPing 9 $$$WebSocketOpPong 10
Property methods: OpcodeDisplayToLogical(), OpcodeGet(), OpcodeIsValid(), OpcodeLogicalToDisplay(), OpcodeNormalize(), OpcodeSet()
property PayloadData as %Stream.TmpBinary [ Required ];
Unmasked binary/character data received or to send - on write, this is masked before sending; on read, it is unmasked automatically.
Property methods: PayloadDataDelete(), PayloadDataGet(), PayloadDataGetObject(), PayloadDataGetObjectId(), PayloadDataGetSwizzled(), PayloadDataIsValid(), PayloadDataNewObject(), PayloadDataOid(), PayloadDataOpen(), PayloadDataSet(), PayloadDataSetObject(), PayloadDataSetObjectId(), PayloadDataUnSwizzle()
property PayloadLength as %Integer [ InitialExpression = 0 , Required ];
The length of payload data
Property methods: PayloadLengthDisplayToLogical(), PayloadLengthGet(), PayloadLengthIsValid(), PayloadLengthLogicalToDisplay(), PayloadLengthNormalize(), PayloadLengthSet()
property RSV1 as %Boolean [ InitialExpression = 0 , Required ];
Reserved - always 0
Property methods: RSV1DisplayToLogical(), RSV1Get(), RSV1IsValid(), RSV1LogicalToDisplay(), RSV1Normalize(), RSV1Set()
property RSV2 as %Boolean [ InitialExpression = 0 , Required ];
Reserved - always 0
Property methods: RSV2DisplayToLogical(), RSV2Get(), RSV2IsValid(), RSV2LogicalToDisplay(), RSV2Normalize(), RSV2Set()
property RSV3 as %Boolean [ InitialExpression = 0 , Required ];
Reserved - always 0
Property methods: RSV3DisplayToLogical(), RSV3Get(), RSV3IsValid(), RSV3LogicalToDisplay(), RSV3Normalize(), RSV3Set()

Methods (Including Private)

private method %OnNew(pDevice As %String = "") as %Status [ Language = objectscript ]
Inherited description: 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.

method Mask(pString As %String) as %String [ Language = objectscript ]
Masks the input string by XOR-ing 4-byte chunks with the masking key
method Read(pTimeout As %Integer) [ Language = objectscript ]
Translates bytes read from the TCP device into a frame
private method ReadBytes(pLength As %Integer, pTimeout As %Integer) as %String [ Language = objectscript ]
Reads in a specified number of bytes from the TCP device
method Write() [ Language = objectscript ]
Translates the frame into the wire format and writes it to the TCP device
private method WriteData(pData As %Stream.Object) [ Language = objectscript ]
Writes a stream out to the TCP device

Inherited Members

Inherited Methods (Including Private)

Feedback