primus
primus copied to clipboard
emit errors to spark
Right now, I have:
primus.on('connection', function connection(spark, next) {
spark.on('error', function(err) { });
next('handshake error');
}
The next function emits an error event to the spark, which I want to relay to the client.
Primus should support something similar to this: http://socket.io/docs/server-api/#namespace%23use(fn:function):namespace (Errors passed to middleware callbacks are sent as special error packets to clients.)
+1