Stored connected sockets and handled subscriptions to particular events.
Mapped the received events to the listening sockets.