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

[ISPN-7802] Limit buffer sizes when reading/writing #5133

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
3 participants
@dereed
Copy link
Contributor

commented May 12, 2017

@danberindei
Copy link
Member

left a comment

I'm not fond of dealing with the same buffer size at two abstraction levels, so I'd rather write our own buffering code that does both bundling and fragmenting (either in TcpTransport itself or in separate stream implementations).

I'm not feeling very strong about this though, so I'm also ok with integrating it as is. Please fix the brace and remove the brackets from the commit message, though :)

}

@Override
protected void writeBytes(byte[] toAppend, int offset, int count) {
try {
socketOutputStream.write(toAppend, offset, count);
for ( int o = offset; o < offset + count; o += SOCKET_STREAM_BUFFER )
{

This comment has been minimized.

Copy link
@danberindei

danberindei May 17, 2017

Member

Brace should be on the same line as the if.

@danberindei

This comment has been minimized.

Copy link
Member

commented May 19, 2017

@dereed Do you mind if I integrate 2ab2269 instead?

@dereed

This comment has been minimized.

Copy link
Contributor Author

commented May 19, 2017

Yes, go ahead.

-Dennis

@wburns

This comment has been minimized.

Copy link
Member

commented May 25, 2017

@danberindei it looks like we need a new PR with your commit then?

@danberindei

This comment has been minimized.

Copy link
Member

commented May 30, 2017

@wburns I just pushed my commit, I had forgotten about it.

@danberindei

This comment has been minimized.

Copy link
Member

commented May 30, 2017

Pushed to 9.0.x as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.