Main processing pipeline for CA messages.
Contains an array of stateless pipes using an extended
connect
middleware that supports websockets:
Internally we have two 'connect' pipelines: one for websockets and the other one for http requests. Pipe configuration will select one (or both) of these pipelines.
Each pipe also provides a connectSetup(app)
method that will register a
standard 'connect' function interface, i.e., function(req, res, next)
.
Typically 'connect' uses stream interfaces on req/res to read the input
and respond. Instead, websockets overlay a message interface by
adding the input message to req.body
. We also guarantee that the response
is sent in a single ws.send
call.
This allow us to easily switch to a plain http interface (no websockets) by
adding the connect bodyParser
middleware, which creates req.body
.
Properties:
{specialMethods: Array.<string>}
where:
specialMethods
: special routes associated with a custom function, e.g.,ping
orstats
.
- Source: