1.0.2 • Published 4 years ago
amf-packet v1.0.2
About
AMF0 packet serializer and deserializer.
Usage
Install using npm:
$ npm install amf-packetSerialize
const { serializeAMF } = require('amf-packet');
const headers = {
	'foo': 'bar',
};
const messages = [{
	'targetUri': 'Service.doSomething',
	'responseUri': '/0',
	'body': [],
}];
console.log(serializeAMF(headers, messages));Deserialize
const { deserializeAMF } = require('amf-packet');
const {
	headers,
	messages,
} = deserializeAMF(buf);
const {
	targetUri,
	responseUri,
	body,
} = messages[0];Implementation notes
The must-understand flag of headers is not implemented.
Message body can be any value supported by amf-codec.