diff --git a/vecio.go b/vecio.go index 8256d03..2334188 100644 --- a/vecio.go +++ b/vecio.go @@ -17,6 +17,11 @@ type iovec struct { idx int } +func (self *iovec) Prepend(b []byte) { + self.data = append([][]byte{b}, self.data...) + self.Len += len(b) +} + func (self *iovec) Append(b []byte) { self.data = append(self.data, b) self.Len += len(b)