import abc

from source import packets, managers


class BaseEvent(abc.ABC):
    def __init__(self, manager: "managers.Manager"):
        self.manager = manager

    @abc.abstractmethod
    def handle(self, packet: packets.base.BasePacket, address: tuple) -> None:
        """
        Handle a packet
        :param packet: the packet to handle
        :param address: the address of the machine that sent the packet
        """
