diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-02-21 23:46:09 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-02-21 23:46:09 +0000 |
commit | c9bfc173aa5b829cb52b25008a9550d3469c86e8 (patch) | |
tree | 8909aa286658b57fcbd8b4445d3e1054036f4595 /pkg/tcpip/buffer | |
parent | 3385b688b8f2fd91fba4b1956e7d7b1c5925d842 (diff) | |
parent | b8f56c79be40d9c75f4e2f279c9d821d1c1c3569 (diff) |
Merge release-20200211.0-65-gb8f56c7 (automated)
Diffstat (limited to 'pkg/tcpip/buffer')
-rw-r--r-- | pkg/tcpip/buffer/view.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/tcpip/buffer/view.go b/pkg/tcpip/buffer/view.go index 150310c11..17e94c562 100644 --- a/pkg/tcpip/buffer/view.go +++ b/pkg/tcpip/buffer/view.go @@ -156,3 +156,9 @@ func (vv *VectorisedView) Append(vv2 VectorisedView) { vv.views = append(vv.views, vv2.views...) vv.size += vv2.size } + +// AppendView appends the given view into this vectorised view. +func (vv *VectorisedView) AppendView(v View) { + vv.views = append(vv.views, v) + vv.size += len(v) +} |