examples/custom-parsers/README.md
Since Socket.IO version 2.0.0, you can provide your custom parser, according to the needs of your application.
Several parsers are showcased here:
They are tested with various payloads:
['1', '2', ... '1000'][1, 2, ... 1000]Buffer.allocUnsafe(1000), where buf[i] = i$ npm i && npm start
| bytes / packet | CONNECT packet | string | numeric | binary |
|---|---|---|---|---|
| default | 1 | 5903 | 3904 | 43 + 1000 |
| msgpack | 20 | 3919 | 2646 | 1029 |
| JSON | 20 | 5930 | 3931 | 3625 |
| schemapack | 20 | 3895 | 2005 | 1005 |
default parser
msgpack
JSON
schemapack