pipe
(since 1.0)
A pipe object
Description
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.
Examples
var mypipe = new Ape.pipe();
Custom pipe
//We create a new custom pipe
var pipe = new Ape.pipe();
//Custom pipe is created with an unique pubid
Ape.log('Custom pipe pubid: '+pipe.getProperty('pubid'));
//We listen "SEND" commands received on this pipe
pipe.onSend = function(user, params) {
Ape.log('Received data from pipe: '+params.msg);
if(params.destroy) {
pipe.destroy();
}
}
See also
- pipe.sendRaw » (Server / )
- pipe.getProperty » (Server / )
- pipe.setProperty » (Server / )
- pipe.destroy » (Server / )
User notes
# No comment
Post a note
CollaborAPE to our wiki !
Find the information you need on the APE Official Wiki : Install, Server, JSF, Help...
