babl-ws / babl

Low-latency WebSocket Server
https://babl.ws
Apache License 2.0
68 stars 22 forks source link

expose request uri on sesion connect #122

Closed ccnlui closed 1 year ago

ccnlui commented 2 years ago

This is my attempt on exposing the request uri. I'd appreciate any feedback.

Also a question, I added requestUri as type varDataEncoding to the SessionOpened sbe schema. While there are plenty of examples of encoding/decoding type varDataEncoding, I couldn't figure out why it's necessary to add BitUtil.SIZE_OF_INT to the message base size.

For example, TOPIC_MESSAGE_BASE_SIZE has an extra 4 bytes, MULTI_TOPIC_MESSAGE_BASE_SIZE has an extra 8 bytes... They don't seem to belong to messageHeader or even varDataEncoding. What are these bytes used for?

epickrram commented 1 year ago

Closing due to inactivity.