github.com/xmplusdev/xmcore@v1.8.11-0.20240412132628-5518b55526af/transport/internet/quic/quic.go (about)

     1  package quic
     2  
     3  import (
     4  	"github.com/xmplusdev/xmcore/common"
     5  	"github.com/xmplusdev/xmcore/transport/internet"
     6  )
     7  
     8  //go:generate go run github.com/xmplusdev/xmcore/common/errors/errorgen
     9  
    10  // Here is some modification needs to be done before update quic vendor.
    11  // * use bytespool in buffer_pool.go
    12  // * set MaxReceivePacketSize to 1452 - 32 (16 bytes auth, 16 bytes head)
    13  //
    14  //
    15  
    16  const (
    17  	protocolName   = "quic"
    18  	internalDomain = "quic.internal.example.com"
    19  )
    20  
    21  func init() {
    22  	common.Must(internet.RegisterProtocolConfigCreator(protocolName, func() interface{} {
    23  		return new(Config)
    24  	}))
    25  }