#59 bufferevent: allow to specify max_to_write_ever & max_to_rea

General (24)

In some cases it is needed to specify maximum values of data sizes for each write() / read() calls. For now, there are hard-coded limits MAX_TO_WRITE_EVER & MAX_TO_READ_EVER.

I've added bufferevent_set_max_to_write_ever() & bufferevent_set_max_to_write_ever() functions allowing to change those limits. MAX_TO_WRITE_EVER & MAX_TO_READ_EVER are still absolute limits though.


  • Nick Mathewson

    Nick Mathewson - 2011-10-10

    Good idea, let me suggest some changes.

    First, "max_to_read_ever" is no longer a good name if it can be changed; I'd suggest max_single_write and max_single_read or something.

    Second, the functions in bufferevent.h need documentation.

    Third, MAX_TO_READ/WRITE_EVER should no longer need to be upper limits here; I think they should only be defaults.

    Other than that, looks good.

  • Nick Mathewson

    Nick Mathewson - 2011-10-10

    (oh, fwiw, I am going on vacation for a week soon, so please forgive any delay in a reply)

  • Alexander Drozdov

    OK, please look at the rewritten patch: 0001-bufferevent-Add-functions-to-set-get-max_single_read.patch

  • Nick Mathewson

    Nick Mathewson - 2011-10-11
    • status: open --> closed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks