PayloadAssembler class
Assembles payloads for streaming library.
Constructors
Payload |
Initializes a new instance of the PayloadAssembler class. |
Properties
content |
|
end | |
id | |
payload |
Methods
close() | Closes the assembler. |
get |
Retrieves the assembler's payload as a stream. |
on |
The action the assembler executes when new bytes are received on the incoming stream. |
Constructor Details
PayloadAssembler(StreamManager, IAssemblerParams)
Initializes a new instance of the PayloadAssembler class.
new PayloadAssembler(streamManager: StreamManager, params: IAssemblerParams)
Parameters
- streamManager
- StreamManager
The StreamManager managing the stream being assembled.
- params
- IAssemblerParams
Parameters for a streaming assembler.
Property Details
contentLength
contentLength: number
Property Value
number
end
end: boolean
Property Value
boolean
id
id: string
Property Value
string
payloadType
Method Details
close()
Closes the assembler.
function close()
getPayloadStream()
Retrieves the assembler's payload as a stream.
function getPayloadStream(): SubscribableStream
Returns
A SubscribableStream of the assembler's payload.
onReceive(IHeader, SubscribableStream, number)
The action the assembler executes when new bytes are received on the incoming stream.
function onReceive(header: IHeader, stream: SubscribableStream, _contentLength: number)
Parameters
- header
- IHeader
The stream's Header.
- stream
- SubscribableStream
The incoming stream being assembled.
- _contentLength
-
number
The length of the stream, if finite.