Skip to content

add support for the upgrade event #32

Closed
@VFabricio

Description

@VFabricio

Hi! I am toying with the idea of writing a web socket server in Purescript. That would require access to the upgrade events emitted by Node's HTTP servers. It seems like this is not currently supported, right?

I think something like onUpgrade :: Server -> (Request -> Socket -> Buffer -> Effect Unit) -> Effect Unit would do the trick.

I understand this a niche use case and that client code could go down to the FFI and wrap this itself. But, since this is part of Node's public API, maybe it would make sense to expose this functionality here.

If this sounds like something that this library would want to support, I'd be happy to submit a PR.

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