implemented buffering for events if socket is not ready