-
Notifications
You must be signed in to change notification settings - Fork 181
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
Feature: make an option to provide buffer size for client scanner #97
Comments
Are you saying that, in client mode, a server that is outside of your control is sending events that are larger than 64 KB? (https://pkg.go.dev/bufio#pkg-constants) |
Yes, exactly |
Hey @Venoox , very sorry for not getting back to you sooner! I think this sounds like a good feature to have. If you still have a need for it, I can try to implement some options for |
@Venoox You should now be able to configure the bufio scanner size in // sets the buffer size to 1 << 19 (524288 bytes)
c := sse.NewClient(url, sse.ClientMaxBufferSize(1<<19)) Please let me know if this has fixed your issue |
This fixes chmouel/gosmee#77. |
I'm trying to use client from this module and the problem I keep having is that the buffer is too small because server is sending events with data larger than max token size from bufio (MaxScanTokenSize).
I can also code this feature and make a PR but I'm not sure what's the best way to go about it. Would you be interested in adding this feature?
The text was updated successfully, but these errors were encountered: