code: func (t *tx) transmit(a, b []byte) bool {
  	// Pull completions from the tx queue and add their buffers back to the
  	// pool so that we can reuse them.
  	for {
  		id, ok := t.q.CompletedPacket()
  		if !ok {
  			break
  		}
  
  		if buf := t.ids.remove(id); buf != nil {
  			t.bufs.free(buf)
  		}
  	}
  
  	bSize := t.bufs.entrySize
  	total := uint32(len(a) + len(b))
  	bufCount := (total + bSize - 1) / bSize
  
  	// Allocate enough buffers to hold all the data.
  	var buf *queue.TxBuffer
  	for i := bufCount; i != 0; i-- {
  		b := t.bufs.alloc()
  		if b == nil {
  			// Failed to get all buffers. Return to the pool
  			// whatever we had managed to get.
  			if buf != nil {
  				t.bufs.free(buf)
  			}
  			return false
  		}
  		b.Next = buf
  		buf = b
  	}
  
  	// Copy data into allocated buffers.
  	nBuf := buf
  	var dBuf []byte
  	for _, data := range [][]byte{a, b} {
  		for len(data) > 0 {
  			if len(dBuf) == 0 {
  				dBuf = t.data[nBuf.Offset:][:nBuf.Size]
  				nBuf = nBuf.Next
  			}
  			n := copy(dBuf, data)
  			data = data[n:]
  			dBuf = dBuf[n:]
  		}
  	}
  
  	// Get an id for this packet and send it out.
  	id := t.ids.add(buf)
  	if !t.q.Enqueue(id, total, bufCount, buf) {
  		t.ids.remove(id)
  		t.bufs.free(buf)
  		return false
  	}
  
  	return true
  }
docs: // transmit sends a packet made up of up to two buffers. Returns a boolean that
  // specifies whether the packet was successfully transmitted.