mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-05 04:47:40 +03:00
Add vectorised interface
This commit is contained in:
parent
13f394e202
commit
05f9836bff
12 changed files with 371 additions and 13 deletions
|
@ -321,6 +321,12 @@ func (b *Buffer) Release() {
|
|||
*b = Buffer{closed: true}
|
||||
}
|
||||
|
||||
func ReleaseMulti(buffers []*Buffer) {
|
||||
for _, buffer := range buffers {
|
||||
buffer.Release()
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Buffer) Cut(start int, end int) *Buffer {
|
||||
b.start += start
|
||||
b.end = len(b.data) - end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue