Skip to content

Router + socket.io #8

@IngwiePhoenix

Description

@IngwiePhoenix

Hey.

I would like to know if there is a way to get around using this hackery:

router.all("/socket.io/*",function(){
    // Do NOT respond here. This is socket.io property.
});

Mainly, I had the idea that router could/should feature two things:

  • Detecting/being made aware of the use of socket.io
  • having a .noRespond function.

The first could be implemented by passing the object that socket.io returns upon creation to router, so it can query it for the path that socket.io expects.

For the latter I thought there could be a simple one-liner like:

router.noResponse("/somePath", [errorCode]);

To make router not respond, or respond with the specied error code instead.

Is that possible?

Kind regards, Ingwie.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions