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.
Hey.
I would like to know if there is a way to get around using this hackery:
Mainly, I had the idea that router could/should feature two things:
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:
To make router not respond, or respond with the specied error code instead.
Is that possible?
Kind regards, Ingwie.