server
Class Ape.pipe

A pipe is an object that is kind of a connector through wich RAWs are sent.

Each user an channel has got an associated pipe.

Pipes created manually (custom pipes) are a little different from user and channel pipes. A manually created pipe is just usefull to receive "SEND" commands from clients (Proxy pipes are working this way). See example for more details.

You can send a response in registerHookCmd and registerCmd. This is useful if you want to assign a callback to a command in client-side.

When calling sendResponse method, the RAW sent to the user has the challenge 'chl' set to the value that came in the request to facilitate a callback. Other methods of sending a response includes pipe.sendRaw however server doesn't set the 'chl' automatically for them.

Parameters:

{string} nameThe RAW name

{object} dataAn object that will be JSON encoded and send out with the RAW