|  | @@ -175,14 +175,14 @@ type SendingQueue struct {
 | 
											
												
													
														|  |  	start uint32
 |  |  	start uint32
 | 
											
												
													
														|  |  	cap   uint32
 |  |  	cap   uint32
 | 
											
												
													
														|  |  	len   uint32
 |  |  	len   uint32
 | 
											
												
													
														|  | -	list  []*DataSegment
 |  | 
 | 
											
												
													
														|  | 
 |  | +	list  []*alloc.Buffer
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  func NewSendingQueue(size uint32) *SendingQueue {
 |  |  func NewSendingQueue(size uint32) *SendingQueue {
 | 
											
												
													
														|  |  	return &SendingQueue{
 |  |  	return &SendingQueue{
 | 
											
												
													
														|  |  		start: 0,
 |  |  		start: 0,
 | 
											
												
													
														|  |  		cap:   size,
 |  |  		cap:   size,
 | 
											
												
													
														|  | -		list:  make([]*DataSegment, size),
 |  | 
 | 
											
												
													
														|  | 
 |  | +		list:  make([]*alloc.Buffer, size),
 | 
											
												
													
														|  |  		len:   0,
 |  |  		len:   0,
 | 
											
												
													
														|  |  	}
 |  |  	}
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
										
											
												
													
														|  | @@ -195,7 +195,7 @@ func (this *SendingQueue) IsEmpty() bool {
 | 
											
												
													
														|  |  	return this.len == 0
 |  |  	return this.len == 0
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -func (this *SendingQueue) Pop() *DataSegment {
 |  | 
 | 
											
												
													
														|  | 
 |  | +func (this *SendingQueue) Pop() *alloc.Buffer {
 | 
											
												
													
														|  |  	if this.IsEmpty() {
 |  |  	if this.IsEmpty() {
 | 
											
												
													
														|  |  		return nil
 |  |  		return nil
 | 
											
												
													
														|  |  	}
 |  |  	}
 | 
											
										
											
												
													
														|  | @@ -209,7 +209,7 @@ func (this *SendingQueue) Pop() *DataSegment {
 | 
											
												
													
														|  |  	return seg
 |  |  	return seg
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -func (this *SendingQueue) Push(seg *DataSegment) {
 |  | 
 | 
											
												
													
														|  | 
 |  | +func (this *SendingQueue) Push(seg *alloc.Buffer) {
 | 
											
												
													
														|  |  	if this.IsFull() {
 |  |  	if this.IsFull() {
 | 
											
												
													
														|  |  		return
 |  |  		return
 | 
											
												
													
														|  |  	}
 |  |  	}
 | 
											
										
											
												
													
														|  | @@ -326,9 +326,7 @@ func (this *SendingWorker) Push(b []byte) int {
 | 
											
												
													
														|  |  		} else {
 |  |  		} else {
 | 
											
												
													
														|  |  			size = len(b)
 |  |  			size = len(b)
 | 
											
												
													
														|  |  		}
 |  |  		}
 | 
											
												
													
														|  | -		seg := NewDataSegment()
 |  | 
 | 
											
												
													
														|  | -		seg.Data = alloc.NewSmallBuffer().Clear().Append(b[:size])
 |  | 
 | 
											
												
													
														|  | -		this.queue.Push(seg)
 |  | 
 | 
											
												
													
														|  | 
 |  | +		this.queue.Push(alloc.NewSmallBuffer().Clear().Append(b[:size]))
 | 
											
												
													
														|  |  		b = b[size:]
 |  |  		b = b[size:]
 | 
											
												
													
														|  |  		nBytes += size
 |  |  		nBytes += size
 | 
											
												
													
														|  |  	}
 |  |  	}
 | 
											
										
											
												
													
														|  | @@ -395,7 +393,8 @@ func (this *SendingWorker) Flush(current uint32) {
 | 
											
												
													
														|  |  	}
 |  |  	}
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  	for !this.queue.IsEmpty() && !this.window.IsFull() {
 |  |  	for !this.queue.IsEmpty() && !this.window.IsFull() {
 | 
											
												
													
														|  | -		seg := this.queue.Pop()
 |  | 
 | 
											
												
													
														|  | 
 |  | +		seg := NewDataSegment()
 | 
											
												
													
														|  | 
 |  | +		seg.Data = this.queue.Pop()
 | 
											
												
													
														|  |  		seg.Number = this.nextNumber
 |  |  		seg.Number = this.nextNumber
 | 
											
												
													
														|  |  		seg.timeout = current
 |  |  		seg.timeout = current
 | 
											
												
													
														|  |  		seg.ackSkipped = 0
 |  |  		seg.ackSkipped = 0
 |