neonize package
Subpackages
Submodules
neonize.builder module
neonize.client module
neonize.const module
neonize.events module
- class neonize.events.Event(client)[source]
Bases:
object- property blocking
- execute(binary, size, code)[source]
Executes a function from the list of functions based on the given code.
- Parameters:
binary (int) – The binary data to be processed by the function.
size (int) – The size of the binary data.
code (int) – The index of the function to be executed from the list of functions.
- wrap(f, event)[source]
This method wraps the function ‘f’ and returns a new function ‘serialization’ that takes two parameters - binary and size. The ‘serialization’ function calls ‘f’ with the client and an event deserialized from a string.
- Parameters:
f (Callable[[NewClient, EventType], None]) – Function to be wrapped. It should accept two parameters - a NewClient object and an EventType object.
event (Type[EventType]) – Type of the event.
- Raises:
UnsupportedEvent – If the provided event is not supported.
- Returns:
Returns a function ‘serialization’ that accepts two parameters - binary and size.
- Return type:
Callable[[int, int], None]