Permalink
Browse files

Removed broken msgpack ext type support (#331)

This feature violated WAMP's design goals. Use of ext types should be
restricted to scenarios where payload transparency is used. But more
importantly, the code was broken by the move to msgpack5.
  • Loading branch information...
agronholm authored and oberstet committed Nov 23, 2017
1 parent e59da86 commit 8106d2cef7c24a9a9ab858e4e0a5a7e6e81cf5f1
Showing with 0 additions and 20 deletions.
  1. +0 −20 lib/serializer.js
View
@@ -86,26 +86,6 @@ MsgpackSerializer.prototype.unserialize = function (payload) {
}
};
/**
* Register a packer and/or unpacker functions for a given type.
*
* The msgpack specification allows applications to register up to 128 extension
* types.
*
* @param code numeric extension code (between 0-127)
* @param type constructor for the given type (only required when packer is defined)
* @param packer a function that takes an object and returns a Buffer
* @param unpacker a function that takes a Buffer and returns an instance of the given type
*/
MsgpackSerializer.prototype.registerExtType = function (code, type, packer, unpacker) {
if (packer && type) {
this.codec.addExtPacker(code, type, packer);
}
if (unpacker) {
this.codec.addExtUnpacker(code, unpacker);
}
};
exports.MsgpackSerializer = MsgpackSerializer;

0 comments on commit 8106d2c

Please sign in to comment.