-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
How to increase the 65K message limit on the receiving side? #32
Comments
Hi there and thank you for raising the issue! You've correctly identified that at the moment there isn't a way to set the internal buffer. I'll push a new version which will add the In the meantime I'm thinking of overhauling the SSE client completely. At least from the issues raised up until this point it seems as if most usage of this library is concerned with the client and I think the experience could be better. Would it be too much to ask for some feedback on the new client proposal? Setting the read buffer would probably be an option on Nevertheless I'll let you know when the update is pushed. |
Here it is, please let me know if |
Wow that was fast. Better yet, it works like a charm! Thank you so much. I will take a look at the client proposal. |
I'm attempting to use go-sse in the hiveot project (iot digital twin hub) and ran into a limitation when pushing messages from the hub to a client via SSE. Everything works well when the messages are smaller than 65K. When they exceed 65K they never arrive. The sending side however does not report any error.
Some digging found that Connection.read() creates parser.New(), which calls bufio.NewScanner() which sets a default buffer of MaxScanTokenSize, which is indeed 65K.
Scanner.Buffer seems to be the way to change this buffer. However I don't see a way to do this in between Connection.read() and the start of scanning.
What is the intended way to change the buffer size after creating a connection?
The text was updated successfully, but these errors were encountered: