kriszyp / msgpackr

Ultra-fast MessagePack implementation with extension for record and structural cloning / msgpack.org[JavaScript/NodeJS]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow for per-instance extensions

tsmaeder opened this issue · comments

We use msgpackr in multiple places to encode/decode rpc calls. There are a couple of objects that need custom handling before encoding/decoding. We use Extensions to handle those type of objects. However the types of objects that need special handling is distinct per connection. It would be great if we could register Extensions per Packr/Unpackr instance, so that they apply only for a given connection, not everywhere. Feel free to tell me to RTFM if I'm just not understanding how I can do this.

This is a very reasonable request, but will need to put some thought into how best to implement.