MCPcopy
hub / github.com/gin-gonic/gin / RunQUIC

Method RunQUIC

gin.go:630–641  ·  view source on GitHub ↗

RunQUIC attaches the router to a http.Server and starts listening and serving QUIC requests. It is a shortcut for http3.ListenAndServeQUIC(addr, certFile, keyFile, router) Note: this method will block the calling goroutine indefinitely unless an error happens.

(addr, certFile, keyFile string)

Source from the content-addressed store, hash-verified

628// It is a shortcut for http3.ListenAndServeQUIC(addr, certFile, keyFile, router)
629// Note: this method will block the calling goroutine indefinitely unless an error happens.
630func (engine *Engine) RunQUIC(addr, certFile, keyFile string) (err error) {
631 debugPrint("Listening and serving QUIC on %s\n", addr)
632 defer func() { debugPrintError(err) }()
633
634 if engine.isUnsafeTrustedProxies() {
635 debugPrint("[WARNING] You trusted all proxies, this is NOT safe. We recommend you to set a value.\n" +
636 "Please check https://github.com/gin-gonic/gin/blob/master/docs/doc.md#dont-trust-all-proxies for details.")
637 }
638
639 err = http3.ListenAndServeQUIC(addr, certFile, keyFile, engine.Handler())
640 return
641}
642
643// RunListener attaches the router to a http.Server and starts listening and serving HTTP requests
644// through the specified net.Listener

Callers 1

TestRunQUICFunction · 0.80

Calls 4

HandlerMethod · 0.95
debugPrintFunction · 0.85
debugPrintErrorFunction · 0.85

Tested by 1

TestRunQUICFunction · 0.64