encode method
dynamic
encode(
- dynamic obj,
- dynamic callback
Implementation
encode(obj, callback) {
if (binaryEventValue == obj['type'] || binaryAckValue == obj['type']) {
encodeAsBinary(obj, callback);
} else {
var encoding = encodeAsString(obj);
callback([encoding]);
}
}