delPipe

(since )



Delete a pipe from the Core.

Description


object delPipe ( string pubid )

This function delete the given pipe identified by his pubid from the core. and fire the pipeDelete event.

Use this function when you no longer need to use a pipe to free the memory.

You should only use this function to delete Uni Pipe (user pipe). The deleting of Multi Pipe (channel pipe) are automatically handled by the Core when you left a Multi Pipe.

Parameters


pubid
The pubid of the pipe to delete

Return values


Return the deleted pipe object.

Examples


//ape var is a reference to APE instance
 
//Join testChannel
ape.join('testChannel');
 
ape.addEvent('userJoin', function(user, pipe) {
    //Get the pipe from user
    var userPipe = ape.getUserPipe(user);
    //Send a message to the user
    userPipe.send('Hello world');
 
    //Delete the pipe as we no longer need it
    ape.delPipe(userPipe.getPubid());
});
 
 

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.