Added callbacks for socket emits.