Skip to content

Return connection #2

@dink10

Description

@dink10

I look at your code. And find it wonderful. But I think it would be better to return not only error from upgrader.Upgrade(ctx) but also connnection. It can helps create every time new connections and work with messages by topic. Also it could be compatible with original idea of "github.com/gorilla/websocket". How do you think?

func myChatHandler(ctx *fasthttp.RequestCtx) { err := upgrader.Upgrade(ctx)// returns only error, executes the handler you defined on the websocket.New before (the 'chat' function) }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions