Class: module:AMF0/Serializer

module:AMF0/Serializer(classAlias, AMF_Serialize)

new module:AMF0/Serializer(classAlias, AMF_Serialize)

Creates a new AMF0 serializer
Parameters:
Name Type Description
classAlias module:AMF0/Serializer~ClassAlias The class alias internally coming from the AMF entrypoint class
AMF_Serialize function The 'serialize' function coming from the AMF entrypoint class
Source:

Members

dynamicPropertyWriter

Cache the method of a Dynamic Property Writer to the AMF0 serializer class
Source:

Methods

flush() → {Buffer}

Flushes the DynBuffer instance by caching the current stream, clearing the holding stream, and returning the cached stream containing the AMF bytes
Source:
Returns:
The buffer containing AMF bytes
Type
Buffer

serialize(value) → {Serializer}

Serializes an object into AMF binary data
Parameters:
Name Type Description
value any The value to serialize
Source:
Returns:
Returns the AMF serializer to perform a swift flush in AMF entrypoint class
Type
Serializer

serializePacket(packet, AMF3_REFERENCE_RESET) → {Serializer}

Serializes a packet into AMF binary data
Parameters:
Name Type Description
packet module:AMF0/Serializer~Packet The AMF packet to serialize
AMF3_REFERENCE_RESET function The 'reset' function coming from the AMF3 Reference class
Source:
Returns:
Returns the AMF serializer to perform a swift flush in AMF entrypoint class
Type
Serializer