Home » Docs » Server »
 

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();
	}
}

User notes


# No comment

Post a note


User notes may be edited or deleted, and usually a note is deleted because of the following reasons:
  • Bugs: Instead report a bug
  • Missing documentation: report that as a bug.
  • Support questions: See the community for available options.

In other words, do not ask questions within the user notes.

Note <b>,<u>,<i> HTML tags are allowed in the posts and the note formatting is preserved. URLs will be turned into clickable links, JavaScipt and C code blocks enclosed in the <source="javascript">JS Code</source> and <source="c">C Code</source> tags will be source highlighted automatically.