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

Add buffer size parameter #13

Merged
merged 1 commit into from
Aug 5, 2018
Merged

Conversation

bboreham
Copy link
Contributor

@bboreham bboreham commented Aug 5, 2018

On a busy machine the default socket buffer size can be overflowed by conntrack messages, so give the caller the option to use a bigger buffer.

I realise the change in API may be unwelcome - happy to code it differently if you prefer.

@alicebob
Copy link
Member

alicebob commented Aug 5, 2018

Thanks for the PR!

I see the problem, and this solution makes sense, but I like the simplicity of the current methods, such as:
func Connections() ([]Conn, error)

Would there be a way to keep them as they are and still solve your issue?

On a busy machine the default socket buffer size can be overflowed by
conntrack messages, so give the caller the option to use a bigger
buffer.

Signed-off-by: Bryan Boreham <[email protected]>
@bboreham bboreham changed the title Add buffer size parameter to Follow() Add buffer size parameter Aug 5, 2018
@bboreham
Copy link
Contributor Author

bboreham commented Aug 5, 2018

I've redone it with extra APIs ConnectionsSize() and FollowSize().
Let me know what you think.

@alicebob alicebob merged commit 1ea2662 into typetypetype:master Aug 5, 2018
@alicebob
Copy link
Member

alicebob commented Aug 5, 2018

great, thanks!

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

Successfully merging this pull request may close these issues.

2 participants