Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4 UTF-8 string as indicator message length #128

Open
gultom opened this issue Feb 13, 2023 · 1 comment
Open

4 UTF-8 string as indicator message length #128

gultom opened this issue Feb 13, 2023 · 1 comment

Comments

@gultom
Copy link

gultom commented Feb 13, 2023

First of all, thank you for this library. Help me a lot!!
Just wondering that how i can set indicator message length is using 4 utf8 string than using hex encoding for send and receive?
Thank you!

@zemuldo
Copy link
Owner

zemuldo commented Feb 14, 2023

Thanks. This library defaults to using 2 bytes for the length Indicator. It will require a tweak to make that work. Setting a configurable encoding for the length indicator for example.

As a work around, you can set it to false using {lenHeader: false} in config during encoding then add it manually while removing it from the buffer before decoding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants