You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: crypto_setup.go
    path of file: ./repos/sealer/vendor/github.com/lucas-clemente/quic-go/internal/handshake
    
    the code of the file until where you have to start completion: package handshake

import (
	"bytes"
	"crypto/tls"
	"errors"
	"fmt"
	"io"
	"net"
	"sync"
	"time"

	"github.com/lucas-clemente/quic-go/internal/protocol"
	"github.com/lucas-clemente/quic-go/internal/qerr"
	"github.com/lucas-clemente/quic-go/internal/qtls"
	"github.com/lucas-clemente/quic-go/internal/utils"
	"github.com/lucas-clemente/quic-go/internal/wire"
	"github.com/lucas-clemente/quic-go/logging"
	"github.com/lucas-clemente/quic-go/quicvarint"
)

// TLS unexpected_message alert
const alertUn
    
func (h *cryptoSetup) HandleMessage(data []byte, encLevel protocol.EncryptionLevel) bool /* stream finished */ {
	msgType := messageType(data[0])
	h.logger.Debugf("Received %s message (%d bytes, encryption level: %s)", msgType, len(data), encLevel)
	if err := h.checkEncryptionLevel(msgType, encLevel); err != nil {
		h.onError(alertUnexpectedMessage, err.Error())
		return false
	}
	h.messageChan <- data
	if encLevel == protocol.Encryption1RTT {
		h.handlePostHandshakeMessage()
		return false
	}
readLoop:
	for {
		select {
		case data := <-h.paramsChan:
			if data == nil {
				h.onError(0x6d, "missing quic_transport_parameters extension")
			} else {
				h.handleTransportParameters(data)
			}
		case <-h.isReadingHandshakeMessage:
			break readLoop
		case <-h.handshakeDone:
			break readLoop
		case <-h.closeChan:
			break readLoop
		}
	}
	// We're done with the Initial encryption level after processing a ClientHello / ServerHello,
	// but only if a handshake opener and sealer was created.
	// Otherwise, a HelloRetryRequest was performed.
	// We're done with the Handshake encryption level after processing the Finished message.
	return ((msgType == typeClientHello || msgType == typeServerHello) && h.handshakeOpener != nil && h.handshakeSealer != nil) ||
		msgType == typeFinished
}