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
CollaborAPE to our wiki !
Find the information you need on the APE Official Wiki : Install, Server, JSF, Help...
