forked fromglynos/cpp-netlib
- Notifications
You must be signed in to change notification settings - Fork425
Commit794a0b9
committed
Test for Less Copy Connection Write
This commit basically is a test for the case where the range passed tothe call to connection::write is actually a Boost.Asio const_bufferderivative. This removes the requirement to make copies of the rangepassed into the call to connection::write. This is a backward-compatiblechange which means code that used to work with the range-based solutionwill still be supported while Boost.Asio const_buffer derivatives passedin will be supported as first-class elements that get used be theimplementation directly.Note: Boost.Asio const_buffers explicitly do not own the memory that hasbeen wrapped to it. Care should be taken when passing in Boost.Asioconst_buffer sequences into the connection::write interface to make surethat the data is still accessible until at least the provided callbackis provided.Note: Backported from 0.9-devel into 0.8-devel.1 parent6e4253c commit794a0b9
File tree
2 files changed
+78
-3
lines changed- boost/network/protocol/http/server
- libs/network/test
2 files changed
+78
-3
lines changedLines changed: 6 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
666 | 666 |
| |
667 | 667 |
| |
668 | 668 |
| |
| 669 | + | |
| 670 | + | |
| 671 | + | |
669 | 672 |
| |
670 |
| - | |
| 673 | + | |
671 | 674 |
| |
672 |
| - | |
| 675 | + | |
673 | 676 |
| |
674 | 677 |
| |
675 | 678 |
| |
| |||
686 | 689 |
| |
687 | 690 |
| |
688 | 691 |
| |
689 |
| - | |
| 692 | + | |
690 | 693 |
| |
691 | 694 |
| |
692 | 695 |
| |
|
Lines changed: 72 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + |
0 commit comments
Comments
(0)