Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ddosia
Copy link
Contributor

@ddosia ddosia commented Sep 5, 2014

resolve #133

@ddosia
Copy link
Contributor Author

ddosia commented Sep 5, 2014

There are several moments, you need to address.
First of all I changed mochiweb_acceptor and mochiweb_request public interfaces. Is this acceptable? And if so, should I increment app version in mochiweb.app.src?

Second. I add ability not to configure recbuf value, by setting it to undefined atom. This will instruct gen_tcp to open socket with default OS settings. But I left default value to 8192 bytes, as it was previously, in order not to change anything for existing clients. Should undefined be default value?

And third, I did not wrote any tests for changing recbuf value b/c I am not sure how to obtain result value from the socket, b/c it depends on OS settings, and, say, on MacOS it will report same value as you passed, but on Linux it will be doubled. Don't know about FreeBSD and other zoo. Any advises?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use case for comparing with undefined?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure that understood correctly: do you want me to change RecBufOpt = if RecBuf == undefined ... to same thing but with case RecBufOpt = case RecBuf of undefined -> ... ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@ddosia
Copy link
Contributor Author

ddosia commented Sep 17, 2014

I did force push with backward compatibility functions added, also I returned usage of mochiweb_request:new/5 in tests and in mochiweb_multipart.

@ddosia
Copy link
Contributor Author

ddosia commented Nov 18, 2014

Rebased to current master and removed ability to set recbuf size undefined (aka controlled by OS)

@etrepum
Copy link
Member

etrepum commented Dec 17, 2014

Looks great, thank you!

etrepum added a commit that referenced this pull request Dec 17, 2014
@etrepum etrepum merged commit 1b55ba8 into mochi:master Dec 17, 2014
etrepum added a commit that referenced this pull request Dec 17, 2014
@jgrnt jgrnt mentioned this pull request Mar 5, 2015
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.

Configurable gen_tcp recbuf

2 participants