Experimental
Optional
detailsA name variant which contains only English lowercase letters with
other incompatible characters replaced with underscore (_
).
Adds a hook to the given hook list if it doesn't exist in it.
A name of hook list.
A function that will be added to hook list.
number of hooks of given key or false
if value were added before
TypeError on invalid function parameter types.
v1.0.0
Whenever any of hooks will execute by server.
A name of hook list.
whenever hooks are active
TypeError on invalid hook list name.
v1.0.0
Protected
debugRemoves references in class properties and methods either by replacing values with a reference to the function that throws an error (for methods and some required properties using getters) or sets them to a nullish value (for optional properties).
As it is hard to guarantee the Garbage Collector will ever deallocate memory after dereferencing all of the objects, the goal is to prevent API consumers from using class method that no longer make sense than implement any kind of the memory cleanup logic.
Note: This operation is designed to be irreversible! You will have to initialize the new class instance if you want to use given transport again.
Error in case object has been already destroyed.
v1.1.0
Protected
errorLists all hooks from the given hook list.
A name of hook list.
Array
of hooks
TypeError on invalid hook list name.
v1.0.0
Whenever this class has been destroyed.
destroy for more details about this state.
Removes all hooks from the given hook list.
A name of hook list.
if hook list wasn't empty before removing — values from it
TypeError on invalid hook list name.
v1.0.0
Removes given hook function from the given hook list.
A name of hook list.
whenever hook has been deleted
TypeError on invalid function parameter types.
v1.0.0
A way to stop the server while destroy-ing the class structure.
Switches state of a given hook list, which can either disable it or not.
A name of hook list.
New state of hooks. Defaults to negation of previous state.
current state of given hook (i.e if it is active or not)
TypeError on invalid function parameter types.
v1.0.0
A name which indicates the given implementation of the protocol.