Minimal changes to the socket API
Changed:
    The addEvent method now has the same syntax like everything else