Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does iris support quic? #1295

Closed
iamazy opened this issue Jul 8, 2019 · 2 comments
Closed

Does iris support quic? #1295

iamazy opened this issue Jul 8, 2019 · 2 comments

Comments

@iamazy
Copy link

iamazy commented Jul 8, 2019

No description provided.

@kataras
Copy link
Owner

kataras commented Jul 9, 2019

If you mean by built-in no, but Iris is one of the most modular web frameworks for backend engineers. Therefore you can support everything, even the http/3 quic protocol, here's a small example:

package main

import (
    "github.com/kataras/iris"
    "github.com/lucas-clemente/quic-go/http3"
)

func main() {
    app := iris.New()

    app.Get("/", func(ctx iris.Context) {
        ctx.Writef("Hello from Index")
    })
    
    // app.Configure(iris.WithOptimizations, or any other core config here)
    // app.Build()
    // http3.ListenAndServe(":443", "./localhost.cert", "localhost.key", app)
    // OR:
    app.Run(iris.Raw(func() error {
        return http3.ListenAndServe(":443", "./localhost.cert", "localhost.key", app)
    }), iris.WithOptimizations)
}

Hope that helped @iamazy.

@iamazy
Copy link
Author

iamazy commented Jul 9, 2019

The example is helpful,Thanks

@kataras kataras closed this as completed Aug 14, 2019
github-actions bot pushed a commit to goproxies/github.com-kataras-iris that referenced this issue Jul 27, 2020
… rel to: kataras#1295

Former-commit-id: 4c970c8143a663e5b879c8aeb6614504432dfe8d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants