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

Comments

@iamazy
Copy link

commented Jul 8, 2019

No description provided.

@kataras

This comment has been minimized.

Copy link
Owner

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.

@kataras kataras added the question label Jul 9, 2019

kataras added a commit that referenced this issue Jul 9, 2019

@iamazy

This comment has been minimized.

Copy link
Author

commented Jul 9, 2019

The example is helpful,Thanks

@kataras kataras closed this Aug 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.